It’s officially the holiday season, which means 70,000 people have temporary jobs at Amazon fulfillment centers to ensure that your gifts arrive exactly when they’re supposed to. While these jobs aren’t exactly easy or high-paying – there’s been plenty written about the not-so-awesome working conditions – it’s in many ways remarkable that Amazon is able to easily leverage the population of a small town less than 15 years after a panic-filled Thanksgiving led to the mammoth and tightly-controlled supply chain system that’s in place today.

The “Save Santa” incident, described in Businessweek reporter Brad Stone’s recent book The Everything Store: Jeff Bezos and the Age of Amazon, was an “all-hands-on-deck emergency” in 1998 resulting from one of the biggest problems an online store can have: there were far more orders coming in than shipments going out. This required all employees – including the executives – to work a graveyard shift at one of two warehouses. “They brought their friends and family,” writes Stone, “ate burritos and drank coffee from a food cart, and often slept in their cars before going to work the next day.” Bezos held contests to see who could pick items off shelves the fastest. Then he vowed the company would never have an inventory shortage again.

“The underlying truth is that Amazon becomes, like almost like all retailers, a different company during the holidays,” Stone explained to me over the phone. “Volume grows over the previous year. The already aggressive and fast-moving environment in the headquarters and fulfillment centers become manic. I describe it as two Amazons: one that operates for 10 months and the other that operates for two months out of the year.”

One of the reasons it runs so efficiently during those two crazy months now are lessons stemming from the holiday chaos of Amazon’s first 10 years. “It ranges from employees cleaning out the Pokémon section of ToysRUS.com or requiring all its white-collar workers to [work] at the distribution centers in Seattle,” says Stone. ”It’s harsh, but a character building moment for the company. Any Amazon employee remembers that time.”

One of the more memorable debacles involved distribution center in Georgia that had a massive backup of unfilled orders. The surprise culprit? A missing pallet of Pokémon Jigglypuffs. Thus, a search team was organized to scour the entire 800,000 square foot warehouse for the pallet. It was found — three days later and at 2 a.m. It was a great learning moment for the company, explains Stone, because “it showed just how fragile the system was.” And it showed the lengths employees would go to ensure on-time holiday delivery.

Today, Amazon has fulfillment centers in 14 U.S. states and in 36 cities around the world. They’re the brainchild of senior vice president Jeff Wilke, a student of Six Sigma who turned “distribution centers” into finely-tuned facilities that run on algorithms and the speed and accuracy of their workers — think Bezos’s 1998 picking contest taken to the extreme (and without the burrito cart). Wilke used to lead a whistlestop tour right before the holiday season, visiting fulfillment centers to check on progress (while wearing a flannel shirt to show solidarity with his on-the-ground employees). Now there are too many fulfillment centers to visit.

Today’s well-oiled Amazon “hides the chaos” of holiday shopping, explains Stone. This is in part what makes Amazon so appealing to consumers who aren’t into the shelves-askew, people-trampling hoard that symbolizes Black Friday at brick-and-mortars. And while the company has plenty of competition – from the Costcos and Walmarts of the world to online niche sites like Blue Nile to the local independent stores that many shoppers have vowed to support – there is no doubt that the frictionless nature of Amazon, combined with shipping products like Amazon Prime, give the behemoth a huge advantage. “Save Santa” may have just about saved Amazon, too.