In your world, the healthcare industry should have the highest profit margins because it saves lives. But in the real world, the healthcare industry has the highest profit margins because it lets people suffer and die. How did we get here?
What is more important than your life! Hey, you're bleeding out right now! Sign this contract where you pay me everything or we won't treat you.
Capitalism only works if you have the option of shopping around, if there is competition. If you're dying, then the first ambulance to reach you get to charge you whatever they like - and they do. And they can take you to an ER where doctors can charge whatever they like - and they do.
So, hey, let's introduce insurance! Now, the purchase decision is separated from the crisis.
Except the goal of the insurance CEO is to maximize profit. No different than any other business. And they do that by not paying for things. Denied. Denied. Denied. And if they can't deny, then they can insist on cost caps.
And of course, the ambulance and ER doctors don't like caps, and so they all leave the "network", and can charge you what they want. And they do!
And the insurance CEOs don't like that and so they say that if you use an out-of-network doctor then they don't cover you, or they cover you even less.
And they pay Trump and Republicans money to pass a law that says, actually they can sell you insurance that doesn't cover anything (if you read the fine print)!
So then maybe you decide that you need a single payer system like the UK, but then the rich people decide that they don't want to pay for the poor people, so they pay the government officials (or they are the government officials) to cut spending and cut spending and now no doctor wants to be a doctor and they can do quite well in a private system or leaving the country.
I think the fundamental problem with your statement is that there is no such thing as a "properly functioning economy". There is only human greed, tribalism and psychopathy.
Have a great weekend!