Amazon (AMZN -0.91%) shares surged the day after Christmas after both the e-commerce giant and third-party reports showed strong holiday sales for online sellers.

Mastercard SpendingPulse said that overall retail sales rose 3.4% in the period from Nov. 1 to Dec. 24. Online sales surged 18.8%, better than last year's growth of 18.4% as e-commerce continues to take up a greater share of overall retail sales, clocking in with a 14.6% share this year. By comparison, overall retail sales growth slowed from 5.1% in the 2018 holiday season. 

Amazon itself shared another vague announcement touting its record growth. Amazon said it had record-breaking sales in the period, and its third-party sellers saw double-digit growth from a year ago, selling more than 1 billion items. Amazon devices -- including Echo Dot, Fire TV Stick with Alexa Voice Remote, and Echo Show 5 -- were big sellers, and its top-selling departments were toys and games, fashion, home, and beauty.

Though we'll have to wait another month to see Amazon's quarterly numbers in detail, investors applauded the performance, sending the stock up 4.4% on Dec. 26, its biggest one-day jump since January. However, Amazon's gains shouldn't come as a surprise. The stock regularly jumps following the Christmas holiday, as Amazon has built its e-commerce operation to be almost perfectly designed to thrive during the holiday season. Here are three reasons why:

An Amazon Prime trailer

Image source: Amazon.

1. The need for speed

Fast shipping is often a priority for online shoppers, but when you're buying an ordinary item for yourself, you can usually afford to wait a few extra days. Christmas shopping, on the other hand, has a hard deadline, and with many shoppers busy with holiday parties, hosting family events, and making other seasonal plans, it can be easy to leave gift shopping to the last minute.

Amazon's new one-day Prime delivery speed means that customers could order as late as Dec. 23 and still receive it in time for Christmas. The company's vast range of products and easy return policy only add to the convenience of holiday shopping on the site. The steps Amazon's taken to provide speed and convenience to its customers help explain why in-store traffic fell 7.7% during the holiday season, according to data from ShopperTrak.  

2. A budding logistics powerhouse

In 2013, Amazon and its logistics partners UPS and FedEx failed to deliver thousands of orders in time for Christmas due to a surprising surge in last-minute orders. In the aftermath of the well-publicized debacle, Amazon committed to building out its own logistics operation to complement the likes of FedEx, UPS, and the U.S. Postal Service when there are surges.

However, since then, it's become clear that Amazon sees logistics as its own viable operation that can carry both Amazon packages and those from other shippers. This holiday season, the company delivered about half of its own packages and widened its rift with FedEx after telling its third-party merchants that they could not use FedEx Ground or Home for Prime orders due to its low on-time rate. Data from ShipMatrix also showed that Amazon-shipped packages had higher on-time rates than both FedEx and UPS during the week after Black Friday. 

Amazon has said it can save money by shipping its own packages, and at the same time grow its competitive advantage by offering a new service to third-party sellers and other shippers. The impact of its fast-growing logistics operation could lift the bottom line when the company reports fourth-quarter earnings.

3. Amazon is writing the industry rules

E-commerce sales continue to grow by double digits, averaging around 15% a year over the past decade, largely because of Amazon's own investments in e-commerce. It's built out a nationwide network of fulfillment centers, grown its Prime loyalty program by stuffing it with more benefits, and now offers one-day delivery. Amazon sets the pace in the e-commerce industry, making other retailers play catch-up.

Even though brick-and-mortar retailers have stepped up their own e-commerce capabilities to compete with Amazon, in-store sales are generally more profitable than online ones, so they would rather draw customers into stores. However, Amazon's relentless growth has forced physical retailers to try to match it with their own offers of fast, free shipping and easy returns. Some retailers like Walmart and Target have handled this shift better than others, such as department store chains, which have struggled.

Since the vast majority of Amazon's sales come from its online channel and the company controls about half of U.S. online sales, the growing share of retail sales happening online is almost always going to translate into a win for Amazon.

Strong momentum going into 2020

Though Amazon has slightly underperformed the S&P 500 index this year, there is little doubt that the tech giant has improved its competitive advantage with advances like one-day delivery, logistics, and its fast-growing third-party marketplace, and that doesn't even include the options that new programs like Amazon Care bring.

Over time, a widening economic moat will eventually translate into gains for the stock. Profit growth has never been consistent at the famously long-term-focused company, but in 2020, Amazon should reap the benefits of its recent investments.