The question is how to provide healthcare for rural communities, these hospitals are it. The citizens often can't afford the healthcare, can't afford to go to a doctor until it's an emergency, and now with many of these closures they can't even get that.
The easiest answer for many states is to expand Medicaid to cover a larger share of the low income population which can bring revenue to the hospitals with visits etc, but that seems to be very difficult politics for some individuals.