It’s been about a month since the U.S. Air Force’s T-X trainer contract was awarded, providing plenty of time for industry and media alike to chew over the decision.

A lot of the conversations I had started out pretty much the same: “Were you surprised?”

I’m not one to place bets on major defense programs, but, yes, I was surprised.

And I was in good company. As the only firm offering a clean-sheet design, with no track record and presumably a whole lot of development and manufacturing costs ahead of it, a lot of people I spoke to saw Boeing as a long shot.

And yet the company won the $9.2 billion contract to produce 351 jets. Moreover, they won on price. And it’s not the only thing Boeing won: there was also the $2.4 billion UN-1N Huey replacement, and the Navy’s $805 million MQ-25 aerial fueling drone contract.

So why Boeing?

First, one could argue that Lockheed Martin might have been pressed by the Air Force to compete for the trainer but did not actually want to win. Not enough to really go bold, anyway. The company has a pretty demanding portfolio already.

Notably, Lockheed Martin CEO Marillyn Hewson said that matching the winning prices for Boeing’s trifecta of wins would have led to cumulative losses across all three programs in excess of $5 billion, “an outcome that we do not feel would have been in the best interest of our stockholders or our customers.”

Why would it be all that different for Boeing?

It won’t be, necessarily. Chances are that Boeing knows full well that it will see losses. It already has — announcing $691 million of new third-quarter charges for winning the contracts. But even billions in charges is palatable for a company that last quarter alone saw free cash flow surge 37 percent to $4.1 billion, and that number is expected to climb to $13 billion or more for the year.

Boeing wins MQ-25 Stingray contract

The Navy awarded Boeing an $805 million contract to build four MQ-25A Stingray UAVs.

That is the fundamental advantage of having a commercial business. Boeing has shown what appears to be the strategy for this program: Ride the wave, borrow from one business to offset losses in the other, keep the St. Louis plant humming and eventually see a major return, particularly when other buyers emerge. (Beyond international sales for T-X, Richard Aboulafia of Teal Group pointed to a few dozen planes procured for U.S. “red air” adversary training, and the prospect of a navalized T-X variant one day replacing the Navy’s T-45 carrier-based trainer, which could be good for 200 more.)

Obviously there’s risk involved. Boeing is counting on future opportunities to more than offset any overages it swallows. The commercial business may be booming, but that’s still a gamble, albeit a relatively safe one. In the meantime, though, Wall Street is pleased, particularly after losses of the Joint Strike Fighter program and Long Range Strike Bomber left some questioning Boeing’s future in combat aircraft manufacturing. This keeps the company squarely in the game.

It’s also an advantage that benefits the Department of Defense and the taxpayer. Looking at the trainer specifically, the Air Force is ultimately getting a more advanced aircraft, built to order, so to speak, for a deep discount. Cost overruns will happen, but the Pentagon won’t be on the hook for them. Perhaps it could bring some added oversight from congressional watchdogs, but that’s a small price to pay. This is a good deal.

But is that ultimately how the procurement game is meant to be played? Is fair competition achieved when one company has more cards to play than others and therefore walks away the winner? It doesn’t leave a clear path to victory for smaller competitors, particularly international ones that are inevitably at a disadvantage from the start. Even a giant like Lockheed Martin, which has more than double the defense revenue of Boeing, has less than half the free cash flow.

So is it fair? Who knows. But it is capitalism.