Seemingly every time Amazon.com (AMZN -1.64%) makes a move in the grocery space, Costco (COST 0.17%) stock falls.

That happened again recently, when the online retailer announced that its deal to purchase Whole Foods would close on Aug. 28 and that some prices would be lowered immediately. That news sent Costco shares from $159.37 at market close on Aug. 23 to $152.45 at the close of trading Friday, Aug. 25, a 4% drop.

The warehouse club has seen its share price decline in general since June 16, when Amazon announced the $13.7 billion purchase of the grocery chain. Costco shares opened June 16 at $170.40 before dropping to $167.11 at market close that day, and falling to an Aug. 25 close of $152.45, a 10% drop since Amazon's purchase of Whole Foods become public.

It's easy to see why the casual observer would think Amazon's purchase of Whole Foods means bad news for Costco. In reality, though, Costco hasn't been hurt by Amazon and has actually steadily expanded its store count and membership base as the online retailer has grown.

The exterior of a Whole Foods Market

Amazon's purchase of Whole Foods has hurt Costco's share price, but not its business. Image source: Whole Foods.

It's not all about pricing

Selling goods and services is, in fact, sort of a sideline business for Costco. The company makes about 75% of its profit from selling memberships, and Amazon would threaten its business only if Amazon's changes to Whole Foods made people reconsider their Costco memberships.

That seems unlikely, because in many ways joining the warehouse club is like joining a gym. Even if a member doesn't use his or her membership much, remaining a member still seems like a good deal. He or she may not be saving money today, but the possibility of doing so in the future makes the $60 renewal cost still feel worth it.

In addition, Costco -- and Whole Foods -- will be strengthened as other retailers close and some shopping centers fail. Both chains offer destination stores.

Costco customers go not just for deals but also for the treasure-hunt aspect of shopping there, the free samples, and the cheap food court. Whole Foods customers might pick up a meal from the various stations and bars in their stores, get a cup of coffee, or in some locations have a regional beer while shopping.

Costco's members are its strength

It's hard to see why Amazon's decision to lower prices on upscale groceries at Whole Foods would cause Costco customers to drop their memberships. The warehouse club has maintained around a 90% renewal rate for many years while competing with Amazon and Whole Foods. 

In fact, Amazon and Costco have shared a lot of customers. According to an October report from Morgan Stanley, as reported by The Seattle Times, 45% of Costco members also had an Amazon Prime membership. That report, taken from a survey of 2,700 people, said that "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."

An Amazon-integrated Whole Foods might be cheaper than the chain currently is, and it may add some different merchandise. That should increase its market share, but at the expense of traditional grocery chains, not Costco.

Nothing Amazon has done changes Costco's core value proposition. The warehouse club still offers value, unexpected merchandise, and all sorts of side perks for being a member. Until Amazon offers a Costco-like experience -- something it has shown no inclination it intends to do -- then both companies will continue to coexist, with Costco's secret strength being its extremely loyal members.