Last year, 24-year-old Nina Dang broke her arm in a bike riding accident in the city of San Francisco. After someone who saw the accident called the hospital, an ambulance picked her up and took her to Zuckerberg San Francisco General Hospital, where doctors performed several tests, put her arm in a splint, and provided her with pain medication, then sent her on her way.

Not long afterwards, she received a bill for $24,074.50. Dang carried health insurance—but the emergency room was out of network, and her insurer would only pay $3,830.79, the rate it considered reasonable for the services she received. She owed more than $20,000.

The twist is that the emergency room is out of network for every single insurer, meaning that even people with gold-plated health insurance who ended up there could be stuck with large medical bills.

At first glance, this story, originally reported by Sarah Kliff of Vox as part of a sharply researched ongoing series about high emergency room bills, might sound like a straightforward tale of dubious billing practices designed to take advantage of people in need. As it turns out, however, it is also a story about government price controls, because the unusually high prices charged by Zuckerberg General were set by the San Francisco Board of Supervisors.

Although Kliff didn't mention it in her piece, she noted in a Twitter follow-up that the rates Dang was charged were explicitly determined by the city via an ordinance designed to "determine and fix the proper reasonable amounts to be charged" to people receiving a variety of medical services, from coronary care ($18,424 last year, $19,714 for the 2018-19 fiscal year), to baby observation ($6,408 last year, $6,857 at present), to "reproduction of documents" ($2 last year, and $2 this year).

The San Francisco ordinance is not nearly as thorough a list of medical incidents as, say, the ICD-10 codes put forth by the Centers for Medicare and Medicaid Services—which differentiates between medical problems such as being "sucked into a jet engine" or being involved in an "accident while knitting or crocheting"—but it is fairly comprehensive in laying out different types of potential treatments and the "proper reasonable amounts" that hospitals must charge for them.

The city, in other words, deserves considerable blame for Dang's medical bill. As Kliff wrote on Twitter, "If you're a San Fancisco resident frustrated with how Zuckerberg General is billing, a lot of your frustration should really rest with the city board of supervisors."

I think that's right. But the deeper problem isn't that the rates are too high. It's that the government is setting the prices to begin with. Attempts to mandate prices for medical care almost always lead to headaches and unintended consequences.

Through the 1970s and early 1980s, for example, many states maintained some sort of rate-setting system for hospitals, essentially demanding uniform pricing overseen by the state. The pricing formulas, however, ended up being confusing and inscrutable, even to the state officials in charge of them; large hospitals manipulated the systems for their own gain, and small hospitals responded by demanding that they be paid higher rates. Medicare has struggled for decades to determine proper reimbursement rates, and found that providers often manipulate the system in order to maximize payments, leading to new payment systems and new distortions.

The problem with government-set prices is that they are not really prices; they are based on bureaucratic whims, not the subtle back and forth between supply and demand, which can exist in a world without explicit negotiations, and yes, even in the case of emergency services, where arrangements can be made in advance and pricing models can be developed to account for the possibility of a medical emergency which makes bargaining or shopping around impossible. But a system in which bureaucrats determine prices makes it difficult (if not impossible) for those models to succeed.

The prevalence of employer-sponsored private insurance contributes to this difficulty, but that too is an artifact of a longstanding federal tax policy that privileges employer benefits, artificially lowering the price of health coverage.

The lack of real market pricing isn't the only problem with American health care, but it's a big one, and it affects nearly every aspect of the system, distorting incentives for providers, administrators, and payers, often at the expense of the sick. It also creates incentives for poor medical care and practice, because health care providers—or at least the administrators who organize the systems in which they work—end up serving third-party payers rather than the individual humans whose treatment should be paramount. In Dang's case, the hospital's justification is that it has to make up for the cost of serving the poor and needy through other patients (like her), which is essentially a way of saying that safety net programs pay so little that hospitals have to come up with ways to extract maximum revenue from everyone else.

Dang may well have been taken by a scammy hospital practice. But she was also served rather poorly by government-set prices that ensured her bill would be as unaffordably high as it is.