Even as the bear market lingers, investors might be surprised to learn that Apple (AAPL 1.12%) still holds the title of most valuable publicly traded company, with its market cap recently clocking in at $2.55 trillion. Perhaps even more impressive is the fact that even in the midst of the ongoing meltdown in technology stocks, the iPhone maker has outperformed the broader indexes and many of its peers.

From their peaks several months ago, the S&P 500 and the Nasdaq Composite indexes have declined 17% and 26%, respectively, while Apple stock has shed just 13%.

That performance notwithstanding, there are plenty of reasons for investors to buy Apple stock and hold forever.

1. It's Warren Buffett's largest holding

Given his extraordinary track record, investors could do far worse than following in the footsteps of legendary money manager Warren Buffett. Since taking the helm of Berkshire Hathaway (BRK.A 1.38%) (BRK.B 1.44%) in 1965, the "Oracle of Omaha" has delivered mind-boggling returns, generating a compound annual growth rate of more than 20%. In fact, by the end of 2021, the company's overall returns clocked in at a staggering 3,641,613%. 

Lest there be any doubt, Apple is far and away Berkshire's largest holding. Buffett ended the second quarter with nearly 895 million shares of Apple stock, worth roughly $122 billion as of June, 30, accounting for about 41% of Berkshire's portfolio. That's quite a vote of confidence from one of the world's most successful investors. 

2. One billion iPhones strong -- and growing

There's no question that the release of the iconic iPhone in 2007 ushered in the modern smartphone and forever changed the way we communicate. The device's sleek design and integrated computing power took the world by storm. Now, as we await the release of the upcoming iPhone 14, Apple dominates the market, with more than 1 billion active iPhones in the wild.

Rumors are swirling that the next-generation device -- which is due to be unveiled next week -- could sport some major upgrades and four new models. Wedbush analyst Dan Ives estimates that roughly 24% of iPhone owners worldwide haven't upgraded their device over the past 3.5 years. Even in the midst of the prevailing macroeconomic headwinds, this could mark the beginning of the next big product cycle for the iPhone. 

3. Apple is the new black

While the iPhone gets all the press, Apple's wearables, home products, and accessories segment -- which includes such products as Apple Watch, AirPods, AirTags, and Beats headphones -- continue to steadily attract converts. Earlier this year, noted tech analyst Horace Dediu announced that "Apple Wearables is now [the size of] a Fortune 100 business." In fact, the segment has generated more revenue so far in fiscal 2022 than either the Mac or the iPad. 

Supply constraints and foreign exchange headwinds have weighed on the segment, which grew just 6% year over year through the first three quarters of fiscal 2022. That said, the resulting pent-up demand will eventually give way to a surge in sales. Furthermore, the company is expected to release the latest versions of its Apple Watch next week. These could include a Pro model, which could serve to supercharge sales of the popular device. 

4. Services: Apple's second-biggest breadwinner

Long before anyone else, CEO Tim Cook saw the potential for Apple's services segment, announcing plans in early 2017 to double its revenue over the coming four years. Fast forward to mid-2022, and services has come into its own.

The segment, which includes Apple Music, the App Store, Apple Pay, and Apple TV+ (among others), just set a June quarter record,  generating 19% of Apple's total revenue. Services also saw revenue records in each major category, including all-time records for Music, Cloud Services, Apple Care, and Payment Services.

Apple TV+ began as something of an industry joke, with just eight programs and a documentary. But nobody's laughing now. Apple has netted more than 250 awards and over 1,100 nominations for its programming, including 52 Emmy Award nominations in 2022. 

5. Dividends: The gift that keeps on giving

Apple began paying a dividend again in 2012 and has amassed quite an impressive track record. The quarterly payout began at a split-adjusted $0.095 and has soared 143% in just ten years.

This includes Apple's announcement earlier this year, which boosted the quarterly payout to $0.23 per share, an increase of 5% for 2022. That likely won't be the last increase as Apple is using less than 15% of its profits to fund the payout, giving the company plenty of opportunity for future increases. 

6. Fewer shares = a bigger slice of the Apple pie

Another highlight of Apple's shareholder-friendly policies is the company's strong share-repurchase plan. Apple began buying back shares in earnest in early 2013 and has never taken its foot off the gas. As a result, with each passing quarter, Apple shareholders own a larger share of the company. In fact, over the past 10 years, Apple's share count has declined by nearly 39%. 

AAPL Shares Outstanding Chart

Data by YCharts.

As an example, the company retired roughly 1% of its shares in its fiscal third quarter and has no plans of slowing down. Earlier this year, Apple announced that it added another $90 billion to its existing share-repurchase program.