Investors punished Amazon's (NASDAQ:AMZN) stock when it reported a decline in profit for its third quarter, the first time in more than two years. The e-commerce giant blamed investments in logistics and higher shipping and fulfillment expenses for the decline.

As shares declined, bulls urged investors to ignore the short-term results and focus on the bigger picture: Amazon is on its way to becoming a shipping powerhouse delivering customers packages in one day or less.

The more products it can offer Prime customers that are eligible for free same-day and one-day delivery, the more sales will grow. It was the case for the 2019 holiday shopping season. Driven by Prime Free One-Day Delivery and Free Same-Day Delivery, it was another year in which Amazon was able to set shipping records. That was rewarded with a 4% surge in its stock. It now sports a market capitalization of $927 billion.

For the holiday period, the tech giant set records for the number of people who tried Prime. In one week alone, Amazon said five million new customers either began a Prime membership or started a trial. The number of items delivered via Prime Free One-Day and Prime Free Same-Day Delivery nearly quadrupled compared to a year ago.

Amazon wants to rid itself of FedEx and UPS

Amazon delivered more than 3.5 billion packages around the globe. To put that in comparison, FedEx (NYSE:FDX) shipped 6 billion packages in all of 2018. Customers also used Amazon's pickup points at an increasing rate during the holidays, with 60% more customers shipping to a pickup location than last year. As it stands, Amazon handles shipping and delivery for most of the products sold on the website, pushing UPS (NYSE:UPS), FedEx, and United States Postal Service to the backburner.

Amazon has made logistics a top priority ever since shipping snafus by the likes of UPS and FedEx muddied its reputation during the 2013 holiday season. With packages failing to arrive on time, Amazon vowed to prevent that from happening again. Since then, it has poured billions of dollars into logistics.

It wants to control everything from shipping out of the warehouses to delivery to customers' porches. That requires large upfront investments. In the second quarter of 2019 alone it spent $800 million to expand its one-day delivery for Prime Members. It's also investing $1.5 billion to develop an air hub in Kentucky that's slated to open in 2021 and will be home to fifty aircraft. Amazon announced its Delivery Service Partner program in May, enabling entrepreneurs to create delivery networks to handle last-mile deliveries for Amazon . The company is also investing tons of money into drone technology and, in June, debuted its Prime Air Drone design.

All of these efforts are designed to reduce its reliance on FedEx, UPS, and United States Postal Service and ensure it offers the speediest delivery, giving consumers little reason to shop elsewhere. Amazon is also betting all these efforts will eventually lower the costs of packaging and delivery.

Stock poised to rise as Amazon wins in shipping

By controlling all of the aspects of shipping and delivery, Amazon stands to benefit in a lot of ways that should send the stock even higher. For one thing, expanding speedy delivery should drive growth in its Prime subscriptions as customers sign up to take advantage of free same-day delivery. That means more subscription revenue for Amazon.

It's also likely to translate into more spending on the platform. Studies have shown that Prime customers spend more on average than those who aren't members. Consumers won't think twice about buying low-ticketed items if they know they can have them the same day without having to pay shipping fees. Then there's the ability for Amazon to sell its logistics services to other businesses, expanding its revenue streams.

A big growth area for Amazon is advertising, and same-day shipping can help there too. If Amazon sells more products, advertisers will be inclined to pay higher rates. It's still a distant rival to Facebook and Alphabet's Google, but it's carving out a growing position in the advertising market.

All of these opportunities could result in a huge windfall for Amazon. Piper Jaffray pegs it at as much as $50 billion, predicting spending on Amazon could increase by about 30% because of speedier delivery. If that proves true, investors could be in store for more growth out of Amazon's stock in 2020 and beyond.

This article originally appeared in the Motley Fool.

Donna Fuscaldo has no position in any of the stocks mentioned. The Motley Fool owns shares of and recommends Alphabet (A shares), Alphabet (C shares), Amazon, Facebook, and FedEx. The Motley Fool has a disclosure policy.

AmazonLogo_Aug2014
Two freshly delivered Amazon boxes are seen on a counter in Golden, Colorado on Aug. 27, 2014. Reuters/Rick Wilking