What happened

United Airlines Holdings (UAL 4.98%) delivered its second-quarter results after the bell Wednesday, and American Airlines Group (AAL 2.98%) came through with its numbers before the bell Thursday. Both had profitable quarters for the first time since the pandemic began, but that wasn't enough to get their stocks flying higher. On Thursday, shares of American and United traded down by more than 8% in response to the companies' dour outlook for the rest of the year. Delta Air Lines (DAL 3.05%), which reported last week, was down nearly 5% as well.

So what

Airline investors have been riding through turbulence since the beginning of the pandemic, and although demand has returned this summer, the combination of sky-high costs and a shortage of pilots has limited the upside for airlines. Despite getting back into the black, neither United nor American was able to match analysts' expectations, and both warned that higher costs were eating into their revenue gains.

United earned $1.43 per share in the quarter -- well short of the $1.94 per share analyst consensus -- on revenue of $12.11 billion. American earned $0.76 per share, just shy of Wall Street's $0.77 per share expectation, on revenue of $13.4 billion.

Like Delta last week, American and United highlighted the operational difficulties they expect to face in the months to come. United, like Delta before it, said it would limit growth in order to focus on improving reliability. American had previously trimmed its schedule to try to avoid system meltdowns due to staffing shortages and weather-related delays.

United CEO Scott Kirby summed up the glum mood, saying in a press release that while "it's nice to return to profitability" there are "fundamental challenges" up ahead.

"We must confront three risks that could grow over the next 6-18 months," Kirby said. "Industrywide operational challenges that limit the system's capacity, record fuel prices, and the increasing possibility of a global recession are each real challenges that we are already addressing."

Now what

The bull case for airlines heading into 2022 was that an uptick in demand coupled with tight capacity would lead to higher revenues and solid profits for the carriers, allowing them to pay down the debt they took on to get them through the earlier stages of the pandemic. The revenue has materialized, but higher costs have meant those profits haven't been as robust as investors had hoped they'd be.

The bull argument is still valid, and American Airlines management in particular stressed that it was putting its cash to work to pay down its industry-high debt load. But as Kirby notes, there is a lot of uncertainty out there, and no quick fix for what ails the industry.

The airlines are on the path to recovery, but it could take until the second half of the decade for some of them to get back to operating as they did prior to the pandemic. This earnings season has both been a testament to the resilience of the carriers and a reminder of the challenges they face.

Given the extended timetable for airlines' recovery and all of the unknowns, investors are understandably viewing the glass as half empty Thursday.