As Hurricane Maria barreled toward Puerto Rico, Sen. Bill Nelson worried that ticket prices for flights out of San Juan and other Caribbean cities would surge. The higher costs would prevent some people from fleeing the storm, the Florida Democrat figured. Using his influence as head of the Senate committee that oversees airlines, he urged major U.S. airlines to cap fares for flights leaving cities in Maria’s path.

Airlines quickly complied. Mr. Nelson’s office declared victory. Economists wept.

That’s because high prices are an essential way to ensure that resources get where they are desperately needed. Imposing artificially low prices creates shortages of vital supplies and makes it harder for people to recover from disasters.

Consider gasoline. In Orlando, Fla., a gallon of regular was selling for as much as $5.99 in the days before Hurricane Irma made landfall, and a 24-pack of bottled water was spotted selling for $99.99 from a third-party vendor on Amazon.

The impulse to denounce the greed reflected in such prices is human. But price hikes are a response to scarcity, and signals that reveal the true severity of scarcity are critical during storms and other crises. Price hikes let consumers know that fuel is scarcer than it was. Price hikes prompt consumers to use fuel more judiciously, buying less gasoline than they would at a lower price. They take fewer unnecessary trips, diminishing pressure on supplies. Price hikes also create a financial incentive for suppliers from outside the area to move their product into high-demand zones. As supplies return to normal, so do prices.

Unfortunately, some politicians can’t restrain themselves from intervening to stop prices from rising. Florida merchants are fined $1,000 for price-gouging during emergencies. Multiple violations in a single day can draw fines as high as $25,000. Members of the House Judiciary Committee recently asked the Federal Trade Commission to investigate “disaster profiteers” who exploited hurricane victims with price gouging.

Yet politicians who suppress prices make it more difficult for storm victims to get much-needed supplies. Artificially low gasoline prices ensure that limited supplies are depleted too quickly, as consumers hoard cheap fuel while they can get it. When price controls on gasoline kicked in with the 1973 OPEC oil embargo, consumers increased the average “reserve” level in their gas tanks. Six years later they began hoarding again when price controls came back after Iran’s 1979 revolution.

The behavior was rational, but only because U.S. policy makers created panic and artificial shortages. During both crises, global oil supply hardly decreased. But Americans wasted hours in long lines and filled their tanks with gas they didn’t necessarily need.

Wasted time has real costs. In 1980 a regulatory quirk forced a handful of California Chevron stations to sell gasoline at below-market prices. Long lines formed, consumers purchased more gas than they otherwise would have, and stations had to ration supplies.

Most of the consumers taking advantage of artificially low prices would have been better off doing just about anything else. In a 1985 study, economists Robert Deacon and Ron Sonstelie concluded that those who waited in line for 15 minutes saved only about $2—less than the average nonsupervisory employee would have earned in a quarter-hour at the time.

History proves that artificially low prices reduce supply, too. As New Year’s revelers in New York City welcomed 2015, Uber’s surge-pricing algorithm stopped working for nearly 30 minutes. Without the guarantee of extra pay, drivers had little incentive to brave New Year’s traffic. Requests spiked 300%, wait times doubled, and the rate of completed trips fell 80%. People who really needed Ubers—and would have been willing to pay surge pricing—couldn’t get a ride.

A similar situation unfolded in Florida last month when JetBlue, Delta and American voluntarily restrained ticket prices on flights out of Florida before the hurricane. By dropping prices during the evacuation, the airlines ensured that flights filled up more quickly, making it harder for many to escape. Some evacuees no doubt booked multiple low-cost flights after prices dropped as a hedge against cancellation. Paying a premium for airline tickets is unpleasant, but letting seats go to waste during an evacuation is tragic.

Price increases are an important means of encouraging as many people as possible to cope as well and as creatively as possible with natural disasters. True, the rising price of goods like gasoline can create problems for consumers, particularly the poor. But these drawbacks are negligible compared to the life-threatening shortages that can result when ill-informed public outrage keeps prices artificially low. Even a poor person is better off being able to buy a bottle of water for $10 when the alternative is to have $10 and go thirsty.

Mr. Boudreaux is a professor of economics at George Mason University.