Amazon (NASDAQ:AMZN) has been the biggest threat to most retailers, but so far Costco (NASDAQ:COST) has remained mostly immune.

The warehouse club has continued to thrive because of its loyal membership base that has stuck by the chain, partly for its discounts, and in part for the chain's shopping experience. Costco offers a mix of groceries, household items, clothes, electronics, and a broad array of services. Members pay $55 a year (or $110 in order to get 2% cash back, up to $750) to access the chain's stores and so far, even as Amazon has grown, Costco has both held on to its customers, and slowly added more.

Costco has not been hurt by Amazon because unlike many retailers it still offers consumers a reason to get off their couch and come into the store. One major draw for the warehouse club that the online retailer has not been able to compete with its grocery offering. 

Grocery is a market where Amazon has so far only dipped a toe into with its Amazon Fresh delivery service, which is available in limited markets. In addition the online retailer has tested a number of convenience and grocery store models, but so far it's only dabbling in the industry.

Going forward however that could change. Amazon recently considered, but ultimately passed up buying Whole Foods (NASDAQ:WFM). Now, a New York Post story reports that the online retailer has interest in buying BJ's Wholesale, a warehouse club with 213 stores and 130 gas stations across 15 states, that operates on the same model as Costco.

A Costco warehouse club.

Costco should be worried about Amazon's interest in BJ's. Image source: Costco.

Why is this a problem for Costco?

The consumers who join Costco are people who have shown that they are willing to pay a membership fee in exchange for access to better prices. That's a trait shared by many Amazon customers who pay $99 for free two-day shipping (and other perks) as members of the company's Prime service. In fact, according to research done by Morgan Stanley, which was first reported on by The Seattle Times, nearly half (45%) of Costco members are also Amazon Prime members.

"Members of both Costco and Prime have not and generally do not intend to spend more with one retailer/e-tailer at the expense of the other," according to the report, which noted brand loyalty being a boon to both.

That's largely because even though both are discounters that certainly overlap in merchandise, the two companies offer different shopping experiences. Amazon has price and selection, but it lacks immediacy, as even two-hour delivery is not the same as having a purchase in hand immediately. Costco has less items on its shelves, but it delivers a unique shopping experience where consumers can get what they want at a good price while also getting exposed to other potential deals, perhaps sampling some food, or even getting an eye or hearing exam.

If Amazon were to buy BJ's, it would, at least in the Northeast where most of the chain's warehouses are located, have an immediate answer to Costco. It would also have a blueprint for future expansion and could leverage a Prime membership base in the U.S. that Consumer Intelligence Research Partners (CIRP) estimated was at 65 million people as of September.

Given that 45% of Costco members out of the roughly 60 million it had across all categories at the close of Q1 2017, are also Prime members, it's very possible that easy access to a BJ's would make a Costco membership redundant for a meaningful amount of members. At first BJ's limited footprint (213 stores in the U.S. compared to Costco's 508) would mitigate the immediate damage, but it's hard to see Amazon buying the warehouse club and not rapidly growing its store count.

How big a danger is this to Costco?

Amazon being interested in buying BJ's and it actually pulling the trigger are two very different things. The New York Post story said that the warehouse club's private equity owners were willing to sell, and that the online retailer was considering the deal.

If an agreement was reached, Amazon would immediately become a major threat to Costco. The company could make BJ's membership a Prime perk, or charge a small premium for it, giving consumers in markets where the chain has warehouse clubs fewer reasons to renew their Costco membership, given that the two retail chains are very similar.

This decision is essentially a referendum for Amazon on how it will handle groceries. If it decides to buy BJ's then Costco has a major problem. If it passes, and opts to build out a line of self-serve convenience stores while expanding Amazon Fresh, then Costco has much less to worry about. This potential deal is a huge risk for Costco, that short of buying BJ's itself, it can do nothing to prevent.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.