Can a company with a market cap of over $2.5 trillion ever be considered an underdog? Perhaps not, but compared to most of its "Magnificent Seven" peers, tech giant Apple (AAPL -1.83%) looks like one.

The iPhone maker hasn't performed well this year, with its shares down by 9% since January. It is lagging behind all the other members of the Magnificent Seven, except Tesla. Apple is facing various issues scaring away some investors, but if it can navigate through them, it could still deliver outsized returns in the long run. Is it worth it to buy shares of Apple today?

AAPL Chart

AAPL data by YCharts.

What's going on with Apple?

Apple's issues started long before this year. The bears have been saying for a while that although the iPhone still generates the lion's share of its revenue, it is no longer the growth driver it once was. This is true, and this problem was highlighted most recently in one of Apple's most important international markets: China. Apple's iPhone shipments in the country have been dropping.

That's not what investors want to see. This issue dents Apple's long-term prospects. But there is more. Apple hasn't made many meaningful moves in the artificial intelligence (AI) field compared to other tech giants. The industry could be the next massive growth driver for innovative tech companies, so one would expect Apple to be on top of it, especially given its iPhone-related issues. But so far, Apple seems to be trailing its would-be competitors in the field.

Lastly, Apple is the target of an antitrust lawsuit from the U.S. Department of Justice (DOJ), joined by more than a dozen states. The lawsuit alleges that Apple has a monopoly in the smartphone market in the U.S. and has used its power to stifle innovation, undercut competitors, and make consumers worse off than they otherwise would have been. This lawsuit could drag on for years. Its outcome adds some uncertainty to Apple's prospects. And the market does not like uncertainty.

Where does Apple go from here?

Though Apple's financial results could be disappointing in the short run, the company's track record has to count for something. Of course, the past isn't a guarantee of anything. However, management and culture matter; in fact, they are among the most important factors driving a company's success.

Apple has created a culture of innovation, adding new and exciting spins to existing technologies and leveraging its incredibly strong brand name and army of loyal customers to make billions from these creations.

Can Apple pull that off again in the AI industry? The tech giant is rumored to be working on various things, although management has been somewhat tight-lipped. Recently, a team of researchers with the company claimed that their generative AI platform performed better than GPT-4, the latest version of the ChatGPT, on some queries. The researchers published a paper defending the claim.

Investors will have to wait a little longer to test for themselves whether that claim is true and see the tangible effects of Apple's AI work on its financial results. However, trusting that the company can be a leader in this niche isn't an article of blind faith.

Further, Apple is still ramping up its services segment. Sure, this segment still makes up a relatively small percentage of the company's revenue. In the first quarter of its fiscal year 2024, ending on Dec. 30, 2023, Apple's services revenue increased by 11.3% year over year to $23.1 billion. Apple's total net sales grew by just 2% year over year to $119.6 billion.

Apple has endless possibilities to continue making significant progress in this segment, from its fintech ambitions with Apple Pay to the various health-related features it has introduced over the years and more. But what about the DOJ's lawsuit?

In the worst-case scenario, Apple's business could be broken into smaller companies. That's something the U.S. government hasn't been able to do since the early 1980s despite many high-profile antitrust lawsuits against major corporations.

That doesn't mean it won't happen here, of course, but the odds aren't strong that this will transpire. Further, the company generates strong cash flows that should allow it to handle litigation costs.

AAPL Free Cash Flow Chart

AAPL Free Cash Flow data by YCharts.

Though the lawsuit certainly doesn't help, I think Apple's innovative abilities, robust underlying business, and excellent customer loyalty -- that includes more than 2.2 billion devices in circulation -- still make it an attractive stock. Investors willing to hold onto the company's shares for the next five years and beyond should remain cautiously optimistic and maybe strongly consider nibbling on the company's shares while it is down.