Amazon (AMZN 1.49%) stock sold off after its second-quarter results, likely because earnings per share of $0.40 missed expectations by a whopping 72%. Not only that, but Amazon guided for operating income of negative $400 million to $376 million next quarter, versus consensus estimates of positive $950 million. So, why should investors should be excited for a company missing profit estimates by over a billion dollars? Because Amazon isn't just any company.

Amazon typically spends all excess profits and operating cash flows on growth initiatives, never giving investors profits. The company benefits by a) not having to pay much in taxes, and b) out-spending and out-experimenting the competition. Jeff Bezos has said the company invests with a longer time horizon than most -- five to seven years out -- so much of the current spending could be considered growth investments. 

Of course, earnings misses would be worrisome if revenue missed as well, but Amazon reported an impressive 25% sales growth to $38 billion, beating estimates by $820 million. That growth rate is impressive for such a large company, but there's still plenty of runway because of the company's forward thinking investments. 

Here are the large opportunities Amazon is pursuing in retail, online video, and cloud computing: 

graphic showing computers connecting in the cloud

Image source: Getty Images.

Online retail

Amazon is the undisputed leader in e-commerce, but while it may appear dominant, it only commands 34% of online retail, and online retail is only 8% of total retail, meaning Amazon has only about 3% retail market share.

Amazon has much broader ambitions than 3%. In fact, the company increased its operations headcount by 42% over last year and increased fulfillment capacity by 30% in 2016, with similar growth plans for this year. 

On top of fulfillment, the company is also investing in new ways to reach customers. In the past quarter alone, it unveiled Amazon Prime Wardrobe, a new social media platform called Spark (a Pinterest rival), and physical bookstores which showcase Alexa-powered gadgets and other wares.

Then there is the small matter of the $13.7 billion acquisition of Whole Foods (WFM) (not included in the results), increased experiments in grocery and delivery, as well as seed investments in a potential pharmacy business.

Cloud computing

Perhaps the most important driver of Amazon's future is its AWS segment, which contributes the bulk of the company's operating profits, though it only accounts for about 10% of revenue.

For AWS, this quarter may have seemed like a disappointment. Operating margins contracted to 22.3%, down from 24.8% last year. While growth was very strong at 42%, it decelerated following 58% growth a year ago.

While some investors may get queasy at contracting margins and "slowing" growth -- if 42% growth could be considered slow -- Amazon is by far the leader in cloud infrastructure with roughly 40% market share. Any market leader boasting 42% growth is impressive, and the market itself is still moving forward at a fast clip. 

Cloud computing is expected to grow 19% through 2020, with infrastructure as-a-service (where Amazon is a leader) growing at an even higher 36.4% rate in 2017. Deloitte predicts as-a-service IT spend will increasingly take market share from traditional on-premise IT solutions, from 25.6% currently to over 35% by the end of 2018.

Large companies such as Microsoft (MSFT 0.46%) and Google (NASDAQ: GOOG) are fighting for more cloud share, so Amazon is solidifying its position by cutting prices while investing in data centers, new services, and sales personnel. Capital leases for data centers increased 71% in the quarter, and the company increased headcount in both sales as well as all-star engineering talent

Moreover, the company explained many customers switched to newer services, which may have cannibalized more expensive older services. If Amazon is improving services and lowering prices, enterprise clients should increasingly flock to cloud from on-premise solutions, and likely to AWS.

Video

Amazon is also investing heavily in streaming video. According to Market Research Future, the streaming market is forecast to grow 17% per year through 2021, to over $82 billion. Again, this is another high growth market that is sufficiently big for Amazon to attack.

In contrast to e-commerce and cloud, Amazon is not the leader in streaming, lagging both Netflix (NFLX -0.08%) and Alphabet's (NASDAQ: GOOG)(NASDAQ: GOOGL) Youtube in terms of viewership. However, Amazon is expected to spend almost $5 billion on video content this year, inching closer to Netflix's market-leading $6 billion budget. Amazon also paid $50 million for the the rights to Thursday Night Football this year -- giving the company access to a market Netflix has chosen not to enter, and threatening traditional cable's hold on live sports.

Bottom line: Amazon's financials paint a picture of a business that is constantly investing in itself. When that's the case, the bottom-line number is always going to be bumpy, but investors need to remember cash is going to better position the business for the next decade.