Many Americans, and those around the world, are mystified at the apparent shortages of N95 masks, protective gear, ventilators and other essential materials necessary to respond to the COVID-19 pandemic. After all, aren’t markets supposed to respond quickly and efficiently to changes in demand? Those on the Right have a strong belief in markets—and yet markets seem to be failing us, just when we need them most. New York, the epicenter of the coronavirus attack in the U.S., is clamoring for medical supplies. Trump has said, don’t look to us, the federal government—and even argued that states should compete in getting the supplies they need. His answer, trust in markets. But markets are disappointing. How should we understand what is happening?

Markets work well, when everything is going smoothly, when things are normal. But markets don’t work well in crises. Indeed, economic crises are symptomatic of markets not working well—they are typically caused by abject failures in markets. The 2008 financial crisis was a quintessential example. No country in times of serious war turns to markets. We don’t use markets to allocate how our troops should be deployed, and we didn’t rely on markets for producing tanks, airplanes, and other essential materiel in World War II. We needed immediate action, with complex coordination and changing demands; markets just don’t work well in these circumstances.

Moreover, markets are short-sighted and risk averse—and the market mechanisms for looking into the future and managing risks are very deficient. And that private risk aversion and that extreme short sightedness gives rise a large discrepancy between social and private returns. Society would like to have an excess supply of masks or ventilators just in case—in case we have an emergency like the current one. A well-functioning government would have stockpiled them, recognizing the risk of not having them in just such a circumstance as the one now confronting us. The cost of storage is infinitesimal compared to the costs of not having these supplies on hand, and a well-functioning government would have recognized this and planned accordingly.

Keep up to date on the growing threat to global health by signing up for our daily coronavirus newsletter.

On the other hand, a private firm producing these just in case they might be needed could well go bankrupt. It would have to pay out production costs now, and hope that it would get a return in the future. There’s no insurance it can buy against the risk that they wouldn’t be needed. Its cost of capital is far higher than the cost to the government and its ability to bear risk is far lower, so at most it will keep a limited inventory—far less than is socially desirable.

But matters are worse: not only doesn’t it pay a private company to inventory these essential products, it doesn’t pay it to build in the capacity to produce. In some cases, like making masks, production lines used for one purpose can easily be repurposed. But not so for others like ventilators.

We have a broader problem in our society: we live at the edge, on the margin, in our never-ending quest for greater efficiency. But in doing this, we’re short-sighted. And this is especially so for our financial markets, which play a central role in allocating resources. We saw that in 2008, in the form of excessive risk taking. Here, we’re seeing it again. They value the short-term gains, paying no attention to the long-term risks. Stock prices soared as firms engaged in share buybacks—with never a thought about how that undermined resiliency; never a thought about, what if, what if, the economy faced another crisis. In our short-sightedness, we took out spare tires from cars, lowering the costs of purchase by a small amount, paying no attention to the costs we pay down the line when we have a flat tire. We’ve been running our entire society without spare tires—and proud of the seeming efficiency we’ve gained. And never prouder than in the health care sector. After all, this is part of how we can give huge profits to the health insurance and pharmaceutical companies.

Even now that the demand is so clear, companies may be slow to step forward. They know that if they charge much more than the normal prices, they’ll be accused of price gouging. But they assume (and hope) that this will be a one-time event. Can they recover the large costs of quickly expanding capacity for a rush of production now at normal prices? Many will judge that the answer is no.

This is a social cost, which needs to be shared across society, and borne disproportionately by the well-off. Hopefully, enough firms will step forward to meet our urgent supplies. But if not, we shouldn’t hesitate to use the war-time powers of the government to commandeer the necessary resources. Time is of the essence. The Trump Administration squandered valuable weeks. There is no time to spare.

Please send tips, leads, and stories from the frontlines to virus@time.com.

The Coronavirus Brief. Everything you need to know about the global spread of COVID-19 Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Contact us at letters@time.com.