I found this interesting article on the situation. They say 1/3 are profitable, 1/3 are break even and 1/3 are losing money. And a lot of those losing money are in rural areas. And "In general, hospitals lose money on Medicare and Medicaid patients, but make up for that by charging private-sector insurers more."
"non-profit" doesn't mean "doesn't make money" its just rules on how you have to spend that money.
There's nothing saying a non-profit can't raise prices of service and then expand the hospital to buy a new wing, or better equipment or hire more doctors. They need the money to provide their services.
I understand that, but there is a limited amount of that which can be done before it becomes spending for spending's sake, which is pointless.
Also "expand the hospital to buy a new wing, or better equipment or hire more doctors" sounds like exactly what they should be doing, because it means they can service more people at a higher standard of care (which is the reason they exist in the first place).