Flying during the holidays? You’re playing a game of musical chairs, and you may end up without a place to sit.

Airlines regularly sell more tickets than seats available on their flights. The practice of overbooking, which is also common in doctor’s offices and hotels, makes perfect economic sense, as this well-produced new TED-Ed video explains. But is it ethical?

Airlines know that not every passenger will show up for the flight. One gets stuck in traffic and misses the plane. Another catches the flu or has a hangover. Another has cold feet about her wedding in Cancun. Whatever the reason, airlines want to ensure that as few seats as possible fly empty, so they sell more seats than the plane’s capacity.

Of course, sometimes too many passengers show up to check in. About 50,000 passengers were bumped from flights involuntarily by US airlines last year, according to the Department of Transportation, but about 10 times as many passengers take the bump voluntarily, answering the gate agent’s call for “a few volunteers” in exchange for freebies.

As the TED-Ed video explains, bumping passengers (voluntarily or involuntarily) comes with a cost—putting bumped passengers up in hotels, rebooking them, giving them upgrades or compensation, or angering them so much that they fly with another airline next time.

So airlines need to walk a fine line, making a shrewd assessment of the economic risks of overbooking vs. underbooking. To do this, they parse many years of data on how many passengers show up for certain routes on certain dates, the video explains. Often they get the number right, no one is bumped, and the airline maximizes its profits.

But if you’re one of the unlucky ones that bumped this holiday season, that’s a cold comfort.