The exciting thing about aerospace and defense giant Raytheon Technologies (RTX -0.08%) in 2023 is how it's setting itself up for excellent medium- and long-term growth. The near-term outlook is excellent, albeit with supply chain constraints holding back profitability somewhat.

But what's more important is how the company will fare in the longer term. And here, there's an even stronger case for buying the stock. The following are three reasons to invest in it. 

1. Long-term growth in the commercial aerospace aftermarket

Raytheon generates around 55% of its revenue from aerospace and the rest from defense. The company is in the throes of reorganizing its segments from four to three, with the two defense-focused businesses becoming part of a so-called Raytheon segment.

Pratt & Whitney (mostly aircraft engines and aftermarket parts) and Collins Aerospace (mostly commercial aerospace original equipment and aftermarket components) will retain their names, but are subject to some tweaking.

The Pratt & Whitney segment (29.2% of 2022 sales) and its commercial aircraft engines are fascinating. Aircraft engines tend to come with a negative margin, meaning they are loss-making.

While that would seem to be an insane business model -- not least because it takes billions of dollars and many years to develop a new large commercial aircraft engine -- the real money is made in the lucrative aftermarket. 

Aircraft engines tend to be used for at least a few decades and are subject to shop visits, where they are overhauled for maintenance. So the more engines delivered now (at the cost of near-term profitability), the more long-term earnings that are generated through aftermarket revenue. 

As such, Raytheon investors should welcome increased deliveries in 2022 and so far in 2023 for Pratt's geared turbofan (GTF) engine, one of two options on the Airbus A320neo family of airplanes.

For reference, Pratt shipped 712 sizable commercial aircraft engines in 2022, compared to 623 in 2021. Pratt's main rival, GE Aerospace, part of General Electric (GE -0.60%), plans a 50% production increase in LEAP engines (also used on the Airbus A320neo family) in 2023.

With Airbus desperately trying to ramp up production in the coming years, Pratt will likely be delivering substantially more GTFs in the coming years. That's a good thing for Raytheon's long-term growth. 

2. Defense spending ramps up

Raytheon breaks out its profit expectations in terms of increases in profitability, showing which segment it expects to generate profit increases. As you can see below, it's set to be another year in which commercial aerospace leads the profit growth at Raytheon.

That said, the company's defense businesses (particularly Raytheon Missiles & Defense, or RMD) are battling to overcome supply chain issues that impair its ability to deliver on its backlog. There's nothing wrong with its backlog, though -- currently standing at a record $34 billion compared to RMD's revenue of $14.9 billion in 2022.

In September, chief financial officer Neil Mitchill upgraded the medium-term growth forecast for its defense business to mid-single-digit to high-single-digit growth. 

Raytheon Technologies Guidance

Adjusted Operating Profit Increase in 2023

Collins Aerospace

$750 million to $825 million

Pratt & Whitney

$200 million to $275 million

Raytheon Intelligence & Space

$75 million to $125 million

Raytheon Missiles & Defense

$175 million to $225 million

Data source: Raytheon Technologies. 

3. The wide-body market is coming back

Not all airplanes are made equal. According to Honeywell (HON -1.08%) CEO Darius Adamczyk, "the aftermarket opportunity of wide-bodies to narrow-bodies are roughly three to one." And Raytheon's Mitchill expects a recovery in wide-body international traffic to lead to revenue growth and margin expansion at Collins Aerospace. 

The good news is that international flights to the U.S. are now tracking above 2019, and there's a recovery in U.S.-China flights to come. Meanwhile, United Airlines recently made the largest-ever order of wide-body planes by a U.S. carrier: 100 Boeing Dreamliners with an option to buy another 100.

Whichever way you look at it, the wide-body market is coming back, and that's good news over the medium term for Raytheon.

Raytheon's medium-term prospects

All told, Raytheon's growth prospects aren't limited to the near term. The GTF offers long-term profitable growth as the engines get used and shop visits increase, the defense spending ramp-up is yet to be seen in Raytheon's profitability, and the recovery in the wide-body market will boost revenue and margins.