The granddaddy of the colas is The Coca-Cola Company, with the Coca-Cola brand launching in 1886. The Pepsi-Cola Company, now PepsiCo (PEP -0.62%), wasn't far behind with its own Pepsi-Cola drink in 1898. And the two have locked horns for cola supremacy ever since.

Neither Coke nor Pepsi was able to take down its cola competitor. So it wasn't long before these two companies upped the ante by developing comprehensive soda-brand portfolios. Nowadays, PepsiCo sells well-known sodas such as Mountain Dew, Pepsi Wild Cherry, Mug Root Beer, Crush, and Starry in addition to its eponymous Pepsi.

PepsiCo built its portfolio by making several key acquisitions. Its 1964 acquisition of Mountain Dew was especially crucial to its present-day success. In the U.S. carbonated soft-drink market, Mountain Dew had 6.6% market share in 2022, according to Statista. I'd say that buyout worked out quite well.

Pepsi's Mountain Dew acquisition was huge. But a merger the following year was even more significant for the company and its shareholders.

It has nothing to do with carbonated soft drinks. But almost half of Pepsi's profits today are derived from a source that would have shocked the beverage company's founders.

When a beverage company dreamed bigger

In 1965, Pepsi-Cola merged with Frito-Lay -- a snack company with a portfolio that today includes Lay's, Fritos, Doritos, Cheetos, Funyuns, Spitz, Cracker Jack, and more. This was a strong departure for a business formerly focused entirely on carbonated soft drinks. But it was a good move.

Through the first three quarters of 2023, PepsiCo's Frito-Lay North America business segment has generated revenue of $17.4 billion. That's nearly as big as its Beverages North America segment's revenue of $19.7 billion.

In North America, Pepsi's snack revenue nearly matches the revenue from beverages. But these snack foods actually have better profit margins. Frito-Lay's operating income of $4.9 billion is better than operating income of just $2.2 billion for beverages.

Not only is Frito-Lay's operating income higher than beverages, it's also accounted for 48% of PepsiCo's total operating income year to date. In short, if Pepsi hadn't pivoted to snacks nearly 60 years ago, it would be half the company that it is today.

Why it matters for investors

There are so many potential takeaways with an observation like this for PepsiCo. For starters, as one of the largest beverage companies in the world both then and now, Pepsi's growth would have been more limited if it had stayed completely within its core competency. Expanding outside of it into an adjacent market with robust cross-promotion opportunities made a lot of sense.

It's similar to what Hershey is doing now, extending beyond candy and into snack items such as pretzels and popcorn.

More broadly, companies that can expand beyond core competencies often make good investments; this trait is known as optionality. Many companies attempt to branch out and few do it well. But PepsiCo is one of the grand success stories.

PepsiCo's blend of beverage revenue and snack sales has an additional benefit for shareholders: It's a potentially more reliable business because it has greater diversity.

All other things being equal, I would choose PepsiCo stock over a pure-play beverage company because of this stabilizing quality. If headwinds blow in the carbonated soft-drink industry for whatever reason, PepsiCo has another part of the business that can help carry it through the challenges.

That's particularly good news for dividend investors. PepsiCo has raised its dividend for 51 consecutive years, making it a Dividend King. Many investors choose to invest in these companies for their predictable dividend payments. Having a diverse business makes it more likely that PepsiCo won't get knocked off the list by a sudden shock to its business.

And it's all possible because the management team for The Pepsi-Cola Company -- a beverage business -- had the foresight to branch into an entirely different arena when it merged with snacking company Frito-Lay.