It's hard to understate the power that Walmart, Amazon, and Costco Wholesale wield in the U.S. retail industry and the broader economy. Together, the three companies generate close to $1.5 trillion in revenue globally. Walmart and Amazon are also the two biggest employers in the country, and Costco is among the top as well.

All three of these stocks have been huge winners over their respective lifetimes, which isn't surprising. If a stock is a leader in a huge industry, it only makes sense that it delivered substantial returns to investors at some point in its history.

What is surprising is that all three of these stocks have been outperformed by an unlikely competitor. What kind of company am I talking about? It's not a disruptor or even a particularly innovative company. It's not a tech company like Shopify. This is a straight-up, no-frills retailer.

A customer shopping at a grocery store.

Image source: Getty Images.

A surprising success story

The retailer I'm talking about is BJ's Wholesale Club (BJ 0.35%), the membership-based club chain, generally thought of as the No. 3 operator in that retail subsector behind Costco and Walmart's Sam's Club. BJ's also competes with Amazon in a broader sense. 

As you can see from the chart below, BJ's has handily outperformed those three peers since 2018, something few investors likely would have predicted back then.

BJ Chart

BJ data by YCharts

If you're wondering what the secret to BJ's success has been, it's nothing particularly stunning. The company has executed operationally, evolving the business as e-commerce has become more prominent and making it more efficient in other ways.

For example, BJ's has worked to streamline its product lines, reducing 40% of stock-keeping units in popular categories, which has helped de-clutter shelves, and it's been more aggressive in launching private-label items, which generally offer higher margins than national brands.

It's also readily embraced e-commerce, launching a buy-online, pick-up-in-store program, for example, something Costco has refused to do. Additionally, the company has partnered with DoorDash to do same-day delivery. 

BJ's has also focused on membership expansion and retention with renewal rates now at 90%, similar to Costco.

Like the other club chains, BJ's has also benefited from being in the right place at the right time. Sales at the warehouse chains surged during the pandemic as the cavernous stores were seen as a safer option that was conducive to social distancing. Additionally, the buy-in-bulk, bargain prices proved popular during an uncertain economic time when plenty of people had time to shop.

However, BJ's also continued to see growth even while the pandemic faded as high inflation again pushed customers to seek lower prices at places like BJ's, and the company's discounted gasoline gave it an edge over other retailers. BJ's was also able to retain the new members it added during the pandemic.

There's another reason why BJ's was able to outperform Walmart, Costco, and Amazon. It's long been cheaper than those stocks, trading at a significant discount based on price-to-earnings ratio for much of its history.

BJ PE Ratio Chart

BJ PE Ratio data by YCharts

Can BJ's keep it up?

BJ's latest results show that the headwinds impacting the rest of the retail sector may finally be catching up to it. Comparable sales, excluding gasoline, were up just 1.1%, and falling gas prices year over year weighed on revenue, which was down 2.7%. Earnings per share (EPS) also fell due to higher labor and occupancy costs as well as spending on new club and gas station openings.

Over the long term, the company said it aims to deliver comparable club sales growth in the low- to mid-single digits (excluding gasoline), total revenue growth in the mid-single digits, and earnings-per-share growth in the high-single-digit- to low-double-digit-percentage range.

Considering that BJ's trades at a P/E ratio of less than 20, that forecast should be enough to drive continued gains in the stock. While a competitor like Costco might be able to deliver faster growth, Costco trades at a price-to-earnings ratio of 41, more than double that of BJ's, even though Costco just finished a fiscal year with just 7.8% EPS growth.

Given that valuation gap, BJ's looks like a good bet to continue to outperform its peers.