An estimated 50,000 people are bumped from flights every year.
Although it’s one of the most infuriating problems to run into while trying to travel, there’s a reason airlines continue the practice—despite how angry it can make bumped customers. And the whole thing is explained in a TED Talk video.
Overbooking is basically a built-in insurance policy for a business. By selling more seats than the airline actually has, they can guarantee a full flight, even if people cancel or don’t show up.
But the process of figuring out overbooking is much more complicated than something like selling an extra 10 seats in case 10 people cancel, as The Points Guy notes. It’s a delicate balance that’s all about the airline’s bottom line.
And it involves a whole lot of math. (For those in need of a refresher on probability, the TED talk should break it down just fine.) But over the years, the game of overbooking has become more and more complicated. Now airlines aren’t just examining the likelihood of passengers to show up for their flight, complex algorithms also factor in traffic, weather, connecting flights, and time of day.
Airlines have become adept at figuring out how many tickets they should oversell without losing money on rebooking passengers on different flights, meaning passengers will probably continue to get bumped.
A traveler’s best defense in a world of overbooking is to know their rights. Passengers bumped from a flight in the U.S. are entitled to “denied boarding compensation,” either in the form of cash, check, free tickets, or vouchers for future flights. The amount of compensation varies depending on length of delay and amount spent on original ticket.
This article originally appeared on Travel + Leisure.