It is legal to oversell an airplane, meaning the airline has more passengers than it has seats, but there are rules about it.
If an airline does oversell, it must make its best effort to find volunteers to give up seats before involuntarily bumping passengers, and the airlines are required to compensate passengers who are involuntarily bumped.
Delta Air Lines was recently fined $750,000 for not following the rules when bumping passengers from flights. In some cases, Delta did not seek volunteers and in others it did not inform passengers that they had a right to cash compensation when they were involuntarily bumped.
In the late 1970s, if an airline oversold a flight, it would give volunteers a check at the time of bumping.
Then someone came up with the idea that giving free tickets for a future flight was more advantageous than giving out money.
Many people were selling those tickets for cash, however, and the airlines didn’t like it. To keep that from happening, they started offering vouchers with restrictions, which caused the black market to go away almost overnight.