In December 2004, Amazon CEO Jeff Bezos threw out a challenge to a small group of employees huddled in the boathouse behind his Medina, Wash. home, a sprawling 5-acre estate on the shore of Lake Washington. Find a way to expand and speed up free shipping, he told them, as a way to increase customer loyalty.

Two months after that brainstorming session, Amazon unveiled Prime. Customers who paid $79 annually would get “free” two-day delivery nationwide for an unlimited number of orders.

“Two-day shipping becomes an everyday experience rather than an occasional indulgence,” Bezos wrote online in introducing the program.

Since its launch 10 years ago, Amazon Prime has irrevocably transformed shoppers’ expectations and, in turn, spearheaded an all-out arms race for faster shipping. Meanwhile Prime has evolved far beyond its simple roots into an all-inclusive package of streaming entertainment, e-book lending and exclusive access to a growing stable of Amazon-branded products like baby wipes.

Today, Amazon says Prime has “tens of millions of members” in the U.S., a typically opaque number from a company that hoards business metrics like state secrets. Analysts speculate there are between 40 and 50 million members worldwide.

Whatever the case, Prime has turned out to be a crucial tool for acquiring customers for Amazon, helping it become the dominant e-commerce company it is now and a threat to all retailers. If Amazon’s cutthroat pricing reels in shoppers initially, Prime keeps them hooked.

It’s also a strategy that has cost Amazon billions of dollars. On its own, fast shipping is a costly proposition, but factor in all those extras, and Prime quickly becomes a money pit.

The sales pitch for shoppers to join the program is compelling. Everyone from shopaholics to families who need to regularly stock up on clothes, books and gadgets can do so without worrying about how much all those orders cost to ship.

Amazon, in turn, gets loyal return customers. It also gets a more predictable and steady stream of revenue by selling those memberships much like Costco, the warehouse retailer.

“We really wanted to make it easy for customers — the idea of, ‘make the decision once, and then for the year, you don’t have to think about it,” says Greg Greeley, Amazon Prime’s vice president and one of the executives who attended that meeting in Bezos’ boathouse alongside Jeff Wilke, then senior vice president of customer service, and Chief Financial Officer Tom Szkutak.

Before Prime, most packages took a week or more to get from door-to-door. Anyone who wanted their orders quickly would have to pay FedEx or UPS big bucks or just have to wait. In some cases, that meant customers would end up visiting a local Wal-Mart or Target instead.

At the time, Amazon wasn’t exactly the big bruiser in e-commerce that it is now. Yes, it was big. But it still faced stiff competition from brick and mortar retailers. Executives also worried intensely about eBay. Although its auction business was already in decline, eBay had proven Amazon’s fiercest competition since the late 1990s, when Amazon began branching out beyond books into sales of music, electronics and toys.

With Prime, Amazon did what it does best — it expanded quickly and aggressively. Over the last 10 years, the number of available items through Prime grew from 1 million to 20 million. Prime also pushed into international markets: first to Japan, the UK and Germany, then France, Italy and Canada.

In 2011, Amazon added a Netflix-like video streaming service to the Prime package. Instant Video, as it was called then, rolled out with 5,000 movies and TV episodes, just a fraction of Netflix’s catalog at the time. It was a move that surprised some pundits, who said it seemed like too much of a detour.

But Amazon’s Greeley argues that shipping and video streaming make sense together. If Prime members liked what they saw on Instant Video, they might buy digital movies and television shows à la carte, and in turn, remain loyal shoppers, further fueling Amazon’s bottom line.

That’s exactly what happened, according to Greeley. From 2011 to 2014, the number of Prime’s subscribers soared, which Amazon largely attributes to the allure of video streaming.

Instant Video now has a catalog of 40,000-plus TV shows and movies from licensing deals with distributors such as Viacom and HBO. It also has a library from LoveFilm, a European DVD and movie streaming business that Amazon scooped up for nearly $317 million in 2008.

Hoping to make Prime Instant Video more compelling, Amazon began developing its own shows. In late 2010, it formed Amazon Studios, a Hollywood production arm that produces series and films from scripts submitted by the public through its website. Studios has produced just three pilots from that pipeline. Its biggest hits have been more standard Hollywood fare. The dark family comedy Transparent, with Arrested Development actor Jeffrey Tambor as a transgender parent, received two Golden Globe awards this year for best TV series and best actor.

Amazon would not say how many Prime members use its video streaming service. But according to a report from Sandvine, a company that makes networking equipment for Internet providers, Prime Instant Video remains a distant second to Netflix but continues to grow. From March 2013 to September 2014, its share of Internet traffic in North America during peak hours of 7 p.m. to 11 p.m more than doubled from 1.27% to 2.6%. That still pales in comparison to Netflix, which accounted for over one-third of web traffic during the same period.

“I think we could have moved more quickly to provide even better TV shows and movies,” admits Michael Paull, a former Sony Music executive who now leads Amazon’s digital video efforts.

Which is why Amazon funneled $1.3 billion into Prime Instant Video in 2014. In January, the company followed up by saying it would produce 12 movies this year and signed Woody Allen to direct his first TV series exclusively for Prime Instant Video in 2016.

Amazon sweetened the pot for Prime users in other areas, too. Members get access to a digital library of over 600,000 e-books for no additional cost, unlimited photo storage and a music streaming service that rivals the Swedish startup Spotify. In November, Amazon released its first original album on the service, a 43-track digital compilation of holiday songs.

In another new twist for Prime, Amazon introduced a line of household products in December. For now, the options are limited to just baby wipes. A line of diapers was recently pulled from sale after customers complained about their design. The idea is to push products that people buy repeatedly and are therefore all the more attractive with free shipping.

“What distinguishes Mom members is that they are amongst the most active Prime customers — they are very engaged,” said Doug Herrington, vice president of Amazon Consumables, a business group that encompasses the groceries, health & beauty, pets and baby product areas.

Because Amazon does not typically disclose data about Prime, it’s unclear how frequently shoppers use the service. But what is clear is that Prime members spend significantly more than more casual Amazon shoppers, according to RBC Capital Markets. Prime members said they spent an average of $538 annually with Amazon, far more than the $320 by non-Prime members.

Also nearly certain: Prime costs Amazon dearly. Greeley declined to disclose specifics, but he suggested as much in an interview. “When you look back, the program was launched in 2005 at $79,” he said. “You factor in just simple inflation, transportation and fuel costs, the price would be over $100 today, in just 2005 dollars.” Translation: Prime doesn’t pay for itself.

Indeed, Forrester analyst Sucharita Mulpuru estimates that Amazon loses at least $1 billion annually on Prime-related shipping expenses. It’s a staggering cost that pushed Amazon to hike the price for Prime by $20 to $99 in April.

“On the one hand, Prime adds to their bottom line, but it’s like a leech that sucks their blood,” says Mulpuru. “When they throw in things like lending library and streaming, it just gets more and more expensive for them.”

If Amazon has been consistent in the two decades or so since Bezos founded it in his Bellevue, Wash. garage, it’s that the company is ready to accept razor-thin profit margins — or outright losses, in some cases — to fuel rapid growth. And until last year, many investors seemed perfectly happy with that strategy.

But 2014 proved to be challenging for Amazon. Growth of Web Services, Amazon’s data center business, slowed for the first time since it opened in 2006. And the company’s first smartphone, the Fire Phone, quickly flopped because of its high price and a crowded market. Shortly after introducing the phone, Amazon wrote off $170 million in losses, of which nearly half came from unsold phones collecting dust somewhere. Amazon shares AMZN tumbled over 23% for the year, as a result.

There are also questions about just how many people pay for Prime. According to a Forrester Research survey of Prime users, about one-third of respondents reported they were currently using Prime via 30-day free trials. The findings open the door to criticism that the numbers are inflated. But Greeley dismisses any such suggestion, and says, if anything, he wished Amazon had offered free trials to shoppers sooner.

“One of our learnings, giving access to our customers to a 30-day free trial and basically letting them sample the buffet before they pay for it, has been a really good way for customers to learn about Prime,” he said.

Competition among retailers to build customer loyalty through shipping programs is intense. For example, ShopRunner, a startup that offers two-day delivery from partner retailers like Brooks Brothers and Toys R Us, charges $8.95 a month.

Then there are services like Google Express and Postmates, which aggressively push same-day delivery. For a small fee, couriers pick up your orders from bricks and mortar stores and deliver them to your doorstep in as little as one hour. (Google Express also offers a Prime-like annual membership.)

Amazon has responded by adding same-day shipping to Prime. For an additional fee, members can request same-day shipping in 12 U.S. markets and one-hour delivery in New York City (more cities are planned later this year). And if Bezos is to be believed, orders could one day arrive even sooner — 30 minutes or less — via drone if they clear regulatory hurdles. Good luck with that.

Greeley dismissed concerns over Prime’s profitability and Amazon’s fluctuating stock price. Believe it or not, he says he’s more focused on satisfying customers with unique Prime offerings like the digital series Transparent and adding features to services, including the unlimited photo storage service, Prime Photo. And like Bezos, he’s looking for ways to make the shipping speedier.

Of course, such investments — the original content, the shipping experiments, the foray into Amazon-branded goods — means Prime won’t become profitable any time soon. But it is growing: in Amazon’s most recent earnings report, Bezos said the number of paying Prime members spiked 53% last year.

In explaining, Greeley refers back to the letter Bezos wrote to shareholders in prelude to Amazon’s initial public offering in 1997. In it, Bezos said he would work on building long-term shareholder value through big bets and innovation.

“The beauty of Amazon’s strategy is it hasn’t changed,” Greeley. “The strategy around Prime hasn’t changed. We’re constantly innovating on behalf of our customers.” Indeed, it’s a strategy Greeley maintains will “bring long-term shareholder value.”

Some shareholders might grumble otherwise, but Bezos himself couldn’t have said it better.