Walmart ($WMT) recently announced that it is closing 63 of its Sam’s Club membership stores throughout the US. These closures were unexpected, and are estimated to be putting thousands of workers out of jobs.

The retailer blamed disappointing numbers and, perhaps more interestingly, local competition, for its decision to shutter the stores. Of all the competitors, big-box membership brand Costco ($COST) continues to grow, open new stores, and even increase its sales numbers.

In fact, for the first fiscal quarter of 2018, Costco reported comp sales growth of a healthy 10.5%, creating a 16% increase in earnings per share.

We pulled openings per year for both Sam’s Club and Costco, and the resulting graph tells an interesting story.

In the graph, we see aggressive growth in Sam’s Club openings since its birth in 1983, with a major spike in 1993. That’s the year that Sam’s Club bought PACE Membership Warehouse from K-Mart and converted most of them into Sam’s Clubs.

But after that, we see a pretty slow decline in year-over-year growth, as Costco outpaced them by a factor of 4 to 5 times in openings per year.

In fact, every year since 1995, Costco expansion has outpaced that of Sam's Club. And most recently, in 2016, Sam’s opened just one location while Costco cut the ribbon for 22 new stores.

If the writing is on the wall, it doesn’t say positive things for Sam’s Club.

While WalMart corporate is calling some of the most recent closures “conversions” into simple warehouses to support Walmart’s arguably successful e-commerce operations, the sting for employees and customers is real, and still being felt.

Were the closures really because of recent market conditions and a need to support WalMart’s successful e-commerce operations? If that were the case, why is Costco’s doing fine in the same markets, with a very similar product? That leaves other variables - customer satisfaction and quality of product - as the likely culprits of Sam’s Club’s seeming demise.

Ad placeholder