San Francisco officials have imposed one of the tightest lockdowns in the country, which has made residents of the nation’s second-highest density city increasingly dependent on deliveries from grocery stores and restaurants.

If officials there want people to stay home and avoid interacting with others at the checkout lines, they should do everything they can to encourage these kinds of services. Instead, Mayor London Breed on Friday issued an emergency edict that will discourage home deliveries and will likely boost prices – and reduce choices – for consumers.

The order, announced with support from the Board of Supervisors, caps all commission fees that home-delivery apps charge to restaurants at 15 percent. The caps stay in place until restaurants are allowed to offer dine-in service again. These companies sometimes charge as much as 30 percent, but often charge as little as 10 percent.

Everyone is sympathetic to the plight of restaurants during these trying times. In San Francisco, restaurant owners have complained about low profit margins after they pay the firms that delivery the meals to people’s homes. But whenever government caps the price of a product or service, the end result always is the same: shortages.

“If the city attempts to dictate contract terms between delivery services and restaurants, it would force our services to radically alter our businesses just as we desperately try to meet the needs of restaurants, delivery people, customers and our communities,” according to an April 8 letter to San Francisco officials from four companies that provide deliveries (DoorDash, Grubhub, Postmates and Uber Eats).

The commission caps, the letter explains, would increase fees for consumers, thus putting home deliveries “out of reach for all but the city’s most prosperous residents.” Furthermore, they not only provide needed food for the city’s residents, but have been a lifeline for vulnerable populations such as the elderly and immunocompromised. Delivery apps also provide an ongoing source of income for drivers and restaurants – no small thing during these tough economic times.

Despite the tired criticisms of those who complain that these companies are flourishing during the crisis, the reality is much different.  According to the letter, DoorDash has slashed fees charged to independent restaurants by 50 percent. Grubhub has provided $30 million in aid to restaurants.  Uber Eats waived customer fees for orders from small restaurants. Postmates has waived commissions for new brick-and-mortar retail merchants in San Francisco.

These are just a few of the ways that these app-based companies – like many companies in myriad industries – have creatively confronted the COVID-19 challenge. It’s best to let voluntary relationships sort themselves out, rather than allow government to impose heavy-handed and counterproductive regulations. All companies need the flexibility to determine their own price structures and run their businesses as they know best.

App-based delivery companies rightly are concerned that San Francisco’s emergency order will be mimicked elsewhere. Officials in Chicago and New York, for instance, already have discussed similar measures. Some people worry that it might be hard to get rid of the cumbersome new rules even after the crisis passes.

San Francisco’s edict was supported by the local restaurant lobby which, presumably, would see the foolishness of price controls if the city capped restaurant profits to protect struggling homebound residents. Ironically, many restaurants could suffer the most from the caps, given that they could depress demand for deliveries and, as Restaurant Dive noted, “force delivery companies to stop doing business with lower-cost restaurants.”

One of the reasons Americans have survived the economic clampdown as well as they have is because of our market-based system that allows prices to free to rise and fall based on supply and demand. This is how markets work every day, even if we don’t like when some things cost more than we’d prefer to pay. Whenever governments mess with that process, customers can’t get what they need – or have to wait in line or do without.

Instead of waiting to see the easily predictable consequences of the edict, the city should roll back the regulations and let restaurants and app-based delivery companies work out their own arrangements. San Franciscans need food-delivery services now more than ever, so it would be tragic if the city made it harder for residents to access them.