A beautiful thing about the free market, as the late economist Milton Friedman observed, is that every transaction within it occurs only because it is mutually beneficial.

Peter buys Paul's sandwich only because each man decides he is better off doing the deal than not. If it happens, it is because Peter wants the sandwich more than he wants to keep his $5, and Paul wants the $5 more than he wants to keep the sandwich.

Take away the freedom to buy and sell at prices to which people consent, and you have introduced a system in which coercion and violence reign, in which transactions are forced that are not to everyone's benefit.

This is the issue at the heart of the notorious incident this week in which officers of the Chicago Department of Aviation dragged a United Airlines passenger screaming (but not kicking) off his flight to Kentucky.

The facts are sure to be fleshed out in court, as they should be. But the gist is that United had a full flight and needed two seats for employees, probably lest a plane full of people in Kentucky be delayed for lack of a flight crew. But no passengers wanted to exchange their seat for an $800 travel voucher. So the crew chose two passengers for removal from the plane at random, presuming that they would be happy enough with the compensation that airlines are required to offer in such situations.

One of those selected, David Dao, did not agree, and suffered injuries as he was hauled off the aircraft. He was not a willing participant in the sale of his seat. As a doctor who apparently had patients to see in Kentucky the following morning, the flight was worth more than the modest financial compensation for being kicked off of it.

So why didn't the airline simply increase its offer until it found a passenger willing to make the transaction? The answer is that federal regulations set an artificial cap on what an airline has to pay if it kicks you off their plane. So long as it can get you to your destination within two hours of your scheduled arrival, an airline doesn't have to pay you any more than twice the ticket price, or $675, whichever is less. And if it cannot get you there within that time frame, it must pay you four times the ticket price, capped at $1,350.

The price cap encourages airlines to hold their ground on compensation, and to turn to the government to use force instead. Which is exactly what happened.

If not for federal price controls, the crew and passengers would have had proper incentives to settle this matter in a civilized manner without bloodshed. The airline could have raised its offer in free travel or cash, or asked passengers to make their lowest offer on paper or by text message, then paid out to the most competitive bidder. They might have paid out a few hundred dollars more, but it would have been a lot less than the $1 billion in value that United's stock has lost as a result of this incident, plus whatever expenses the airline incurs in the lawsuits that are sure to follow.

With a real market solution, everyone would be better off. And in the era of ride-sharing and house-sharing apps, this should not be a complicated problem to solve.

Congress and the Trump administration can fix this for the future by scrapping a bad regulation. Even before they do, airlines would do well to make mutually beneficial deals with passengers, even if it costs more than regulations require.

Markets have, in the course of lifting billions out of poverty, created a world in which, even as wars rage, fewer people live in conditions of war and tyranny than at any earlier point in history. Trust people to act in their self-interest, and even airlines and passengers, two belligerent species, can find a way to solve their differences peacefully.