Healthcare doesn't function as a market because the nature of it is largely at odds with the principals of an efficient marketplace and perfect competition. Not to mention the tens of billions of dollars being pocketed by middlemen every year.
If that's true, explain surgical center pricing, which often beats health chain prices by over 50%.
If you're talking emergency medicine and old age care, yes, it's not able to function as a market.
Hence why the US already has government healthcare that covers almost half the population (Medicaid and Medicare cover the old, young, disabled, veterans, and poor people).
However, the place you give birth is, in the vast majority of cases, something people do like to have agency over, especially given the 9 months of heads up given by nature.
If healthcare weren't so perversely incentivized by the twisted triangle of regulated public/employer/private systems and their interactions, I would argue this is something that could be a functioning market.
Like Universities with their endless ability to raise prices due to the US government guaranteeing student loans of any size to anyone, a big problem in healthcare is there being no anchor to reality due to the principle-agent nightmares of the current regulated system.
In Europe, when you give birth it is not a luxury experience with a doctor of your choosing in a 4-5 star level private room where you're sent home with a big basket of freebies. If all Americans had to pay directly out-of-pocket (as Europeans de-facto do via taxation), you can bet reality would set in quick.
In some places, free market healthcare is great. Dermatologists, dentists, chiropractors, things like that. And part of the reason it's great is because you get to shop around and people fight for your business.
In other areas, like heart attacks and strokes, you do not get to shop around. And you pay whatever they say you will pay. When those are the circumstances, there is simply no free market. And since no one is competing for your business with lower prices in that case, you do not get to see lower prices. They charge whatever they can maximally wring out of you.