$10,000 offers to get off a plane, CEO apologies and free pizza: Here’s how a massive labor shortage and pent-up demand helped create a chaotic summer for airlines

Each holiday weekend this summer has ended in chaos for many travelers facing huge numbers of flight cancellations and delays. July Fourth weekend could likely be more of the same.

More flights have already been delayed in 2022 compared to any year in the past decade, according to data from the Bureau of Transportation Statistics, with cancellations also near record highs. Airlines have offered travelers everything from pizza during delayed flights, to $10,000 cash to get off overbooked planes. And the CEO of Delta apologized to passengers for the flight disruptions.

More than two years into the COVID pandemic, people have started to travel again, and as demand rebounds, experts say that airlines are struggling to accommodate with a labor pool of pilots that shrunk two years ago and has yet to recover.

“The pilot shortage for the industry is real, said United Airlines CEO Scott Kirby on a quarterly investor call in April. “And most airlines are simply not going to be able to realize their capacity plans because there simply aren’t enough pilots, at least not for the next five-plus years.”

To confront the surge in travel disruptions, lawmakers have threatened to impose punishments on airlines for overbooking flights while airlines themselves have moved to increase compensation packages to attract and retain pilots.

Here’s what’s going on with summer travel.

A pandemic-tightened labor supply

The airline industry took an enormous hit in early 2020 when the pandemic halted the majority of air travel, and lockdowns kept millions of Americans and international fliers at home.

To keep airlines afloat, Congress provided a total of $54 billion to the industry in three rounds of support over the course of 18 months. The funding was designed to keep payrolls intact so that there would be enough pilots, maintenance staff, and flight attendants once restrictions lifted and people began to fly again.

“All of it was to ensure two things,” says Capt. Dennis Tajer, who flies for American Airlines and serves as communications chair for the airline’s union, the Allied Pilots Association (APA). “One, the airline industry does not collapse. Two, that the airline industry is ready for the recovery.”

The first, he says, was a success, but the second a failure.

As part of the terms of the first round of federal support, airlines could not furlough or lay off their workers. They could, however, incentivize workers to leave, which they did by offering early retirement packages to pilots nearing 65—the age at which pilots must retire by law.

As a result, thousands of pilots likely left the workforce early, according to Tajer. At American alone, 715 pilots volunteered for early retirement in 2020, the APA told the Dallas Morning News.

That smaller supply of pilots, combined with this summer’s high demand for flights, has resulted in the current strain on the pilot labor pool, with airlines competing with each other for workers. Other major airlines have begun to recruit pilots from American’s regional affiliates to join their mainline staff, says Tajer.

This year, poaching pilots is “unlike anything we’ve ever seen,” he says.

And while staffing shortages are impacting the industry acutely today, it’s possible they’ll persist for years to come.

The aviation industry will require a total of 612,000 new pilots along with over a million new maintenance staff and cabin crew over the next 20 years, according to a report from aircraft manufacturer Boeing released last year.

“Meeting projected pilot, aircraft mechanic and flight attendant demand is wholly dependent on industry’s investment in a steady pipeline of newly qualified personnel to replace those who have left or will soon exit the industry,” wrote Boeing in its report.

That investment could take many forms, according to the Air Line Pilots Association (ALPA), the largest pilot union in the world with over 65,000 members, including helping potential pilots finance expensive flight training and education and focusing on recruiting a more diverse workforce.

A plight of cancellations and delays

When demand for travel began to bounce back early last year, Tajer hoped the summer would be a trial season for a more robust recovery this year.

“How are things looking right now?” he asks. “They’re looking horrid, and there’s no break in the action.”

If one of his flights gets canceled, others downstream are impacted as well, he says. “That airplane doesn’t have a pilot because I didn’t make it,” he says, outlining the ripple effect that every flight delay and cancellation represents.

A spokesperson for American Airlines told Fortune that in response to the labor issues, it has cut down on the number of flights it offers.

“Like many network carriers, American has reduced our regional flying in recent months in response to the regional pilot shortage,” wrote a company spokesperson in a statement. “That shortage could loom for some time.”

Delta Air Lines told Fortune that staff shortages have been compounded by other factors, like weather and air traffic control constraints, contributing to current flight disruptions.

“Canceling a flight is always our last resort, and we sincerely apologize to our customers for any disruption to their travel plans,” said a company spokesperson.

United Airlines did not respond to Fortune’s request for comment.

Airlines have begun to take drastic action—like offering thousands of dollars to passengers to take a different flight—to ease the impact that cancellations and delays have had on consumers.

Company leadership has also stepped up to apologize for the current series of delays and cancellations.

“We’ve spent years establishing Delta as the industry leader in reliability, and though the majority of our flights continue to operate on time, this level of disruption and uncertainty is unacceptable,” Delta CEO Ed Bastian wrote in a letter to the company’s frequent flier program members this week.

In May, Alaska Airlines posted a video on YouTube featuring the company’s CEO Ben Minicucci apologizing for not anticipating a pilot shortage sooner.

“By the time we caught this error, April and May schedules were bid on by our pilots and flight attendants, making it impossible to sufficiently adjust schedules to avoid cancellations,” he said.

This story was originally featured on Fortune.com