Since Mastercard Inc. (NYSE:MA) and Visa Inc. (NYSE:V) went public, shareholders have enjoyed returns that have destroyed the S&P 500 index. In May 2006, Mastercard had an initial public offering with the stock valued at a split-adjusted $3.90 per share. Two years later, Visa followed suit and went public at a split-adjusted price of $11 per share. In the past 10 years, Mastercard's and Visa's stocks have almost mirrored each other, returning 685% and 667%, respectively, while crushing the market's return of approximately 100% over the same time span. This incredible growth has not slowed down: Over the past year, Visa has roughly tripled the market's returns, and Mastercard has almost quintupled it!

MA Chart

MA data by YCharts.

Yet the two companies now sport price-to-earnings multiples worthy of young growth stocks. Based on 2017 non-GAAP earnings per share of $4.59, Mastercard's P/E ratio is close to 38. Similarly, Visa trades at a P/E ratio of almost 33 based on its trailing-12-month adjusted EPS of $3.70.Given the high multiples and the run-up in stock prices, some investors could be tempted to sell now to cash out gains. I don't share that sentiment, however, and think long-term investors will be richly rewarded for holding on to these two companies for years to come. Here are three reasons why:

Close-up of a credit card showing the partial number.

Mastercard and Visa stand to benefit from mega trends like e-commerce, mobile commerce, and the lowered cost of card acceptance in emerging markets. Image source: Getty Images.

E-commerce on the rise

In the fourth quarter of 2017, e-commerce sales grew $119 billion, a 16.9% increase year over year. Total retail sales rose only 5.7% over the same time, according to the U.S. Census Bureau.When shopping online, 48% of consumers favor using a credit card over any other method of payment, according to the 2017 Total System Services (TSYS) U.S. Consumer Payment Study. The second most popular form of payment for online shopping is debit cards. Both of these payment types overwhelmingly increase the odds that a Mastercard or Visa account will be used to make the purchase.

If anything, this trend will only accelerate over time. At the 2017 UBS Global Technology Conference, Visa Chief Financial Officer Vasant Prabhu said the rise of e-commerce makes complete business sense for entrepreneurs:

People are not thinking about opening bricks-and-mortar stores if they don't need to, right? So anybody who has a concept of being a merchant and selling your goods and services, initially, almost anywhere in the world today, thinks about doing it in the digital world rather than in the physical world. So there again, so you immediately start with the growth of retail, if you want to call it that. It's clearly biased toward e-commerce to begin with. So that's a phenomenon by itself.

Prabhu added that, for online purchases, "the propensity to use a Visa card is twice as high as [in] a face-to-face transaction."

Payments on the go

It's not just e-commerce that is on the rise, however. Mobile commerce, too, is becoming more popular. Consumers are incorporating their smartphones into their daily lives more than ever before. This includes using them to make purchases in-app and at retailers' checkout counters. In 2017, more consumers than ever before, 66% according to the TSYS payments study, were familiar with making in-app mobile payments. In addition, 44% of consumers used their banking mobile app to pay bills; that's up from 34% just one year ago.Not only that, but 59% of customers made a purchase using a credit card already on file in the app, thus making it easier and more convenient to use this method to shop. That's up from just 46% in 2016, according to TSYS's study.Unsurprisingly, young consumers are most familiar with mobile commerce. In the 18-24 age group, 85% are aware of in-app mobile payments. In the 25-34 age group, that percentage jumps to 88%.

Again, this trend can only benefit Mastercard and Visa.

Lowered cost of card acceptance around the world

With the advancement of mobile connectivity around the world, international retailers no longer need expensive equipment and landline access to facilitate card transactions at the point of sale. While this might not matter too much for domestic vendors, it can make a world of difference for merchants in emerging economies.

In fact, with QR code technology, retailers can start accepting payments within minutes of downloading an app -- and no equipment is needed beyond a smartphone and a printed QR code.Last month, Mastercard acquired South African mobile-payments start-up Oltio to help facilitate mobile payments in emerging economies. The lowered expense of card acceptance is certainly leading to an increase in card terminals. For instance, India saw more acceptance-point growth in the past year than it did the previous five years combined.

The final takeaway

Long-term investors in Mastercard and Visa have been richly rewarded, but that doesn't mean the ride is over -- or that it's too late for other investors to partake. The rise of e-commerce is a trend that will only accelerate in the years ahead, and should provide both Mastercard and Visa opportunities to facilitate transactions without competing against cash or checks. As younger consumers use their phones more for in-app purchases, they are charging their 16-digit accounts already saved on file. Finally, with the advance of mobile technology, card and digital acceptance is finally feasible for merchants in emerging economies.

These catalysts are already manifesting themselves in the companies'  fundamentals. In Mastercard's 2017 fourth quarter, net revenue rose to $3.3 billion, a 20% increase year over year, and adjusted earning per share rose to $1.14, an even more robust 33% increase year over year. These strong numbers were fueled by a 17% increase in switched transactions, the number of purchases made using a Mastercard account.Similarly, Visa saw a 26% increase in adjusted earnings per share powered by a 12% increase in payment volume, the total dollar amount of the purchases made across Visa's network, and a 12% rise in processed transactions.The strong growth and future catalysts all point to years of more market-beating returns ahead.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.