Netflix (NFLX 0.45%) and Amazon.com (AMZN -3.04%) have plenty in common.

Both companies are about the same age -- Netflix was founded in 1997 and Amazon opened for business in 1995 -- and both harnessed the power of the Internet early for their core businesses, Netflix for ordering DVDs, and then streaming, and Amazon for e-commerce. The two also share more than a few similarities as stocks: Both companies are barely profitable and carry sky-high valuations. The two were also the top-performing stocks on the S&P 500 last year and have outperformed the market by a mile over the course of their publicly traded histories.

The reason both companies have crushed the market, and why they can justify such high valuations, is that each one has tapped into an explosive potential market that didn't exist when the companies were founded. For Amazon, it's e-commerce and for Netflix, Internet TV. The ever-expanding markets have ensured strong revenue growth from each company. 

NFLX Revenue (Quarterly YoY Growth) Chart

NFLX Revenue (Quarterly YoY Growth) data by YCharts.

As the chart shows, though growth rates have been volatile, both companies have been able to grow sales above 20% most quarters for the past 10 years. Not a lot of companies can boast that record.

A long-term growth generator
The key to Netflix's and Amazon's futures is that both of their industries are expanding rapidly on their own and are set to continue doing so over the next decade or two. Netflix CEO Reed Hastings sounded prophetic when he said last year, "We will come to see that linear TV declines every year for the next 20 years and that Internet TV rises every year for the next 20 years." It's hard to dispute that prediction as cord-cutting fears pressure traditional media companies, Internet access and devices to enable video consumption continue to improve around the world, and as Netflix has been joined by competitors including Amazon itself, HBO, Hulu, Showtime, and others.

Amazon's opportunity in e-commerce is even larger. The company, dubbed The Everything Store, seeks to be a one-click shop around the world, and its relentless growth is a testament to success. Amazon has taken its original premise -- that the Internet could offer a wider selection than any store could -- and doubled down on it many times over. The companaly has rolled out services like Prime Now, which delivers items within one hour, and its Prime membership service has become enormously popular with free two-day shipping and other benefits. Already passing $100 billion in revenue last year, Amazon could surpass Wal-Mart, which has nearly $500 billion in revenue, as the world's largest retailer within the next decade.

Both Amazon and Netflix are committed to the long game -- Netflix even displays its long-term view on its website -- and have demonstrated that they are unafraid to disrupt themselves. Amazon has done it with e-books, and Netflix did it with streaming. Such willingness to innovate and undermine their own advantages is what has made the stocks such big winners.

Competition exists, but...
The concern about competition stymieing Netflix has been raised many times by analysts. Indeed, Netflix faces a raft of competition around the world as others have recognized the opportunity in video streaming, but Netflix's plans won't so easily be upended. The company has 81 million subscribers, an unrivaled sum for a streamer, and it's leveraging that base to build a global content library that will be difficult to match. Already, Netflix has passed HBO in the U.S. as the No. 1 in original programming, and its advantage is likely to widen as it grows its subscriber base and spends more on content.

Amazon, meanwhile, is thought of as being unrivaled in e-commerce, but the company also faces competition from Wal-Mart, Google, and many other bricks-and-mortar retailer and delivery services. Still, the company's network of warehouses and its Prime membership program give it a sustainable advantage.

Both companies are leading huge emerging industries. E-commerce sales have been growing consistently in the U.S. at around 15% for years and show no signs of slowing down. There's no comparable data for video streaming, but Netflix has already signed up nearly half of U.S. households for its service, and the entry of competitors around the globe shows that growth is strong.

E-commerce and Internet TV are set to grow for the next 10 or 20 years, if not longer. Netflix and Amazon are at the forefront of each industry and look set to remain there. The opportunity will be huge.