Everyone has an air travel horror story, usually one including some combination of delays, lost bags, smelly seat-mates, and cranky personnel. Yet most everyone's tale of woe would pale in comparison to that of the man who was dragged off a plane at Chicago's O'Hare airport Sunday night.

United Airlines had overbooked the Louisville, Kentucky-bound flight, and offered up to $800 for anyone willing to wait for a later trip. Not enough people volunteered, so the airline selected four people—already in their seats—to leave behind. Three got off the Embraer 170 jet willingly, according to The Chicago Tribune, but the man in question refused to get up.

Airport police boarded the plane and pulled the man (whose name has not been revealed) from his seat. Video shows them dragging him down the aisle, his mouth bleeding, as horrified flyers scream in the background.

"We are going to fix what’s broken so this never happens again," United CEO Oscar Munoz said in a statement issued Tuesday. "This will include a thorough review of crew movement, our policies for incentivizing volunteers in these situations, how we handle oversold situations and an examination of how we partner with airport authorities and local law enforcement.2

While it was the airport police who extricated the man, the public has aimed its fury at United—and at every other airline that routinely sells more seats than it can fill.

How is this a thing, the people rage? The short answer: Because it's financially smart. The good news: It's getting better. Kind of.

Why Are You Selling Too Many Seats, Airlines?

Airlines have been overbooking flights since the 1950s because it makes perfect economic sense. Not everybody shows up for every flight. Plans change, hangovers take hold, connecting flights show up late. And every empty seat costs money.

"It’s all about trying to maximize the revenue they bring in, and part of that is making sure there’s a butt in every seat,” says Brett Snyder, who runs the air travel assistance business Cranky Concierge. Overbooking is good for everybody, in a sense. “When you have fewer butts in seats, the fares need to be higher to cover all the costs that involved.”

For the airlines, the opportunity costs really do add up. Itir Karaesmen Aydin, an American University researcher who has studied overbooking strategies in the airline and hotel industries, puts it this way: If a 100-seat airplane sells $200 tickets, and only 95 percent of passengers show up, the airline loses out on $1,000. (Even if the airline doesn't refund those tickets, it could have sold five more seats for an extra $1,000.) “The major airlines in the United States fly thousands of flights every day,” Karaesmen Aydin says—even a few empty seats on every flight means losing millions in potential revenue every 24 hours.1

How Do You Decide How Many Seats to Sell?

The why is obvious; the how is harder. Sell too few seats, you lose money. Too many, you piss off passengers. And so airlines turn to fancy math. Their forecasting systems start with a series of complex inputs: historical data on no-show rates (how many people showed up for this flight last week? Last year?); how many of the tickets sold are refundable; and how many are coming off connected flights. Airlines even use individual data: If you have a habit of missing flights, they'll sell more seats on your flight than they would otherwise.

A human analyst tweaks these models based on outside circumstances. Maybe there’s a music festival in town, full of flakey drunks who might miss their flights. Or a hurricane is rolling in and no one's missing their flight out of town. Then airlines’ proprietary algorithms crunch the numbers and come up with that perfecto overbooking balance.

The Fallout

Well, that’s the idea. Humans are capricious beasts, and airline overbooking forecasts are not always spot-on. When an airline realizes its flight is still overbooked near takeoff time, it turns to bargaining. Passengers willing to step aside get cash payments, or flight vouchers. (Delta even asks passengers during check-in how much they’d be willing to take to switch their flight, forcing passengers to show them their cards.)

In most cases, all of this calculation adds up. According to numbers from the DOT (check 'em below), major American airlines bumped just .09 percent of their customers in 2015. More than 90 percent of those souls took the voluntary buyout, presumably because their travel plans were flexible. Voila: the airline filled its seats, the passenger made off with some cash, everyone is happy.

The trouble comes when flights have to bump people involuntarily. It’s not just deeply unpleasant for their gate agents, it's a guaranteed way to infuriate a customer. It's also expensive. In 2011, the Department of Transportation decreed that involuntarily bumped passengers have the right to up to four times the value of their tickets, maxed at $1,350.

United's Sunday night fracas could cost it a lot more than that—but don't expect the airline, or its competitors, to stop overbooking anytime soon.

[google_table url="https://docs.google.com/spreadsheets/d/141eia5lOyk19h4bz0MxLcUM30BHd6uIPiJokxVsVDoo/pubhtml" title="Passengers Boarded and Bumped by the Largest US Airlines (Thousands of Passengers)"]Data via the US Department of Transportation.[/google_table]

1Story updated Tuesday April 11 at 10:50 EST to clarify the opportunity cost of overbooking to airlines.

2Story updated Tuesday April 11 at 17:45 EST to include updated statement from United.