Apple (AAPL 0.02%) has been a wonderful investment in recent years, rising 226% in the past five years (as of Aug. 21), crushing the Nasdaq Composite index's 72% gain during the same time. That return has benefited Warren Buffett's Berkshire Hathaway, since the conglomerate has a 5.9% stake in the tech business. 

Apple's popular product lineup includes the iPhone -- arguably the greatest piece of hardware ever invented -- which still accounted for 49% of company revenue last quarter. But the company is seeing success in other areas that are driving financial results and the stock price. A smaller division might define the business over the next two decades. 

Let's take a closer look at the company's budding services segment. 

Creating an ecosystem 

Over the past 20 or so years, Apple has mainly been known for introducing game-changing hardware products, like the iPod, iPhone, MacBook, iPad, Watch, and AirPods. All have seen tremendous success, as evidenced by Apple becoming the world's most valuable business with the most powerful brand. There are more than 2 billion active Apple devices worldwide, indicative of how ubiquitous the products have become. And these items generated 74% of overall revenue in the most recent quarter (the fiscal third quarter of 2023, which ended July 1). 

The remainder of revenue was derived from the services segment, which includes Pay, Card, iCloud, TV+, News, Music, AppleCare, and the App Store. "Our services revenue set an all-time record of $21.2 billion, up 8% year over year," CFO Luca Maestri highlighted on the earnings call. More importantly, it continues to represent a larger chunk of Apple's total sales as the products segment registers slower growth. Sales of hardware were down 4% year over year in Q3. 

The way things are shaping up, it wouldn't be surprising to see Apple's revenue mix depend less on its popular hardware products over the next two decades, and lean more toward software offerings. And shareholders should be totally fine with this outcome. In fiscal 2022, services posted a stellar gross margin of 72% versus products' 36%. As more revenue comes from services, it can help boost Apple's profitability metrics.

Services play a critical role for Apple 

Services also provide a recurring revenue stream. Apple has found so much success by getting customers to buy its products any time new upgrades are introduced. But with the improvements of newer versions becoming less and less groundbreaking, consumers might be more inclined to delay buying upgrades if they don't need them. That's why offering services that generate recurring revenue is critical for Apple right now. 

The other benefit to the company is that Apple is now in control of a budding ecosystem that combines its beautifully designed hardware products with easy-to-use software services. For example, owning an iPhone or MacBook becomes even more valuable with the added services that users can access only by being an Apple customer. This helps to drive greater stickiness from consumers who might now be ingrained in the overall ecosystem. 

"This past quarter, we reached an important milestone and passed 1 billion paid subscriptions across the services on our platform, up 150 million during the last 12 months and nearly double the number of paid subscriptions we had only three years ago," Maestri mentioned on the call. That's impressive growth that should encourage investors. 

Even Buffett appreciates this favorable situation. In an interview earlier this year, the Oracle of Omaha said that if you offered someone $10,000, but they had to stop using their iPhone and they couldn't buy another one for the rest of their life, that person would almost certainly decline that proposition. That incredible brand loyalty is poised to become even more pronounced as Apple's services increase in importance.