(NASDAQ:AMZN) and Costco Wholesale (NASDAQ:COST) are two of the most powerful retailers operating today. Not only does each company bring in around $100 billion in annual sales, but both are also growing much faster than the overall retail industry. Their shares have also consistently outperformed the broader market, while rival Wal-Mart Stores (NYSE:WMT) has underperformed, as the chart below shows:

^GSPC Chart

^GSPC, data by YCharts.

The secret to the success of Amazon and Costco is really no secret at all. Both companies are among the best ranked at customer service, which is key to driving return business, and both have focused their business models around loyalty programs.

At Costco, profit is driven by its $55 annual membership fee, and membership fees make up more than 75% of operating income. The membership program allows the company to charge rock-bottom prices for its bulk goods, which are essentially being sold at cost. In 2014, Costco had 42 million paid members. 

Shopping on, on the other hand, is not limited to members the way it is at Costco. Nevertheless, its membership program, Amazon Prime, drives much of its retail sales. Amazon has always kept mum about the number of Prime members, saying only that there are tens of millions of Prime subscribers. However, according to surveys, Prime members spend about twice as much as non-Prime members on average, and there could be as many as 40 million members worldwide.  

With an annual fee of $99, Prime drives billions of dollars in revenue in membership fees and locks customers into Amazon's ecosystem with a unique network of benefits, such as access to Amazon Instant Video, the Kindle Lending Library, and free cloud storage through Amazon Web Services. 

The stickiness factor
Membership programs like Costco's and Amazon Prime help businesses build an economic moat by locking the customer into an exclusive relationship with the provider. Once a consumer has paid the membership fee, she is likely to try to maximize the benefit by using the service as much as possible. 

Those membership programs are a major reason why Costco and Amazon have been growing sales much faster than the overall industry.

US Retail Sales Chart

US Retail Sales, data by YCharts.

Perhaps it's not a surprise, then, that both companies' membership programs have been overwhelmingly successful. Last year, Costco's member renewal rate was 91% in North America and 87% globally.

Amazon does not publish the renewal rate for Prime members, but a survey by research company Consumer Intelligence Research Partners found that 95% of respondents said they would definitely or probably renew their memberships. Other estimates have given a renewal rate between 90% and 95%. Prime is also likely to become stickier as Amazon stuffs it with more benefits. Just last week, Amazon made free same-day shipping available to Prime members in 14 major metropolitan areas.

With loyalty rates around 90%, the average member of Prime or Costco will stick around for 10 years, indicating a powerful relationship between seller and consumer.  

Apples-to-apples comparisons with competitors are difficult to make as not all such businesses publish those figures. That said, Wal-Mart's Sam Club division has just about half the revenue of Costco with a similar number of stores and square footage, indicating the importance of customer loyalty.

Amazon knows that Prime is its biggest key to future growth, which is why it continues to add more benefits to the service. Costco's membership program allows the company to offer lower prices than consumers can find elsewhere, which -- along with its customer service -- encourages such high membership renewal rates.

As for the question posed in the headline, there is no clear winner. But what is clear is that both companies understand the power of loyalty, and as long as they maintain renewal rates around 90%, their growth should continue to outpace that of the industry.