Hospitals set their prices above what most insurance companies will pay to make sure they get the maximum amount from the insurance company.
When you come in without insurance, you appear to get screwed because the prices are extra high just in case some new fancy insurance comes along willing to pay more. Luckily, in many cases it's not terribly difficult to negotiate a lower payment.
I'm not advocating for this system, I think it's terrible, but I understand how it came to be.