They're grappling with costs because their professional ethics require they treat people who can't pay, yet their business obligations require they don't treat those people until it's serious and likely expensive.
So because X number of people get X-Rays that will never be paid for, providers have to try to find some amount they can charge those who do pay, to cover the difference. And the trick with that, is that insurance companies know damn well what X-Rays should cost and have the bargaining power to squeeze out much of the padding in the cost of an X-Ray. [1]
Which means those costs are eating into profits in a big way and has healthcare providers struggling to make the math work out. Particularly for those that service poorer areas, where fewer well-ensured patients can offset the cost of uninsured patients.
And when you don't have a lot of slack in your budget, it's pretty difficult to add beds and professionals to increase your ability to supply healthcare.
[1] Which is another perverse incentive for the hospitals to use new machines/drugs/methods when old ones will do just fine. Firstly, they're incentivized because their profit is largely function of the percent of raw cost the insurance companies allow for profit. So an X-Ray++ brings in more profit than a bog-standard X-Ray for the same amount of professional time.
Secondly, because newer tools are by definition not yet commoditized, they can squeeze more 'buffer' into those prices, until the insurance companies can sort out what it 'should' be and more hospitals get in on tool X and begin essentially competing with one another, by accepting lower rates.