On Wednesday, Delta Air Lines (DAL 4.05%) announced that it had struck an agreement to buy 40 planes from Boeing (BA 1.51%). The order includes 20 new 737-900ER jets plus 20 used Embraer (ERJ 2.21%) E190 jets that Boeing is acquiring from Air Canada.

Delta will expand its fleet of 180-seat Boeing 737-900ERs. Image source: Delta Air Lines.

This order is similar to a tentative agreement the two companies had reached earlier this year (albeit somewhat smaller). Delta will get planes at a great price while Boeing now has a buyer for some of its hardest-to-sell planes.

False start
In June, Delta announced that it had reached an agreement to buy 40 737-900ERs and 20 used E190s from Boeing, contingent on its pilots ratifying a new contract. This aircraft order was intended as an incentive for pilots to vote in favor of the then-pending tentative contract agreement, as adding the 98-seat E190 would create new mainline pilot jobs.

However, Delta's pilots rejected the tentative agreement. While the proposed contract would have given them industry-leading pay, many pilots wanted an even bigger increase in light of Delta's soaring profitability.

Without a pilot contract in place, Delta stated that it would cancel the tentative aircraft order. Just last month, it announced plans to refurbish and extend the life of 14 older Boeing 757s that otherwise would have been replaced by 737-900ERs a few years from now.

Delta recently decided to extend the lives of 14 older Boeing 757s. Image source: The Motley Fool.

Yet Delta and Boeing ultimately came back to the table and resurrected the aircraft deal with two important changes. First, Boeing is only selling half as many 737-900ERs, to account for Delta's decision to keep some 757s flying longer. Second, Delta got a better price on the deal.

Why it's good for Boeing
Delta Air Lines is notorious for driving hard bargains in its aircraft deals. If it got even better pricing this time around than it negotiated six months ago, it must have secured humongous discounts from Boeing.

That said, Delta is taking planes that aren't very desirable to most airlines. It's worthwhile for Boeing to give big discounts to get these planes out the door. The 737-900ERs will be some of the last current-generation jets off the production line. By 2019, almost all production will have moved to new models that offer double-digit fuel-efficiency improvements.

Meanwhile, there is even less demand for used E190s. Embraer is on track to begin deliveries of an updated version of the E190 in 2018, which will offer a double-digit reduction in unit costs. Embraer has a smaller backlog than Boeing and Airbus have for their next-generation models, so airlines wouldn't have to wait long to get the new E190, either.

In this context, Boeing's best move was to sell the E190s as soon as possible, even at a loss. It's just a cost of doing business: Boeing bought the used E190s from Air Canada in order to land a valuable order for at least 61 737 MAX planes.

Why it's even better for Delta
For Delta, once Boeing's asking price came down, this aircraft order made sense even without a new pilot contract. At the company's investor day on Thursday, Delta management emphasized the unit cost benefits available from "upgauging" to larger aircraft.

Upgauging to larger planes has big unit cost benefits. Image source: Delta Air Lines.

The Embraer E190s will allow Delta to further reduce its usage of fuel-guzzling 50-seat regional jets. Delta executives clearly think that 50-seat jets don't have a future, due to a growing pilot shortage in the regional airline industry and poor customer satisfaction.

Meanwhile, the additional orders for Boeing 737-900ERs will enable Delta to retire some of its more than 100 MD-88s. These planes were built between 1987 and 1993 and are already about 25 years old on average. Furthermore, they have only 149 seats, compared to 180 seats on the 737-900ER. Delta will thus capture upgauging benefits from replacing MD-88s with 737-900ERs.

Finally, the incremental order for 737-900ERs will also allow Delta to grow modestly in the domestic market. For 2016, it plans to increase domestic capacity by 1%-3%. If it continues growing at this rate, it will probably need to increase its domestic fleet by an average of 5-10 planes per year.

Boeing and Delta will both benefit from finally firming up this aircraft order that has been more than six months in the making. But Delta was clearly the biggest winner in this deal.