What happened

BJ's Wholesale Club Holdings (BJ 0.70%) investors beat the market this week as the stock gained 10% through Thursday trading compared to a 0.2% drop in the S&P 500, according to S&P Global Market Intelligence. The jump added to significant gains for owners of the regional warehouse retailer, whose shares are up 12% so far in 2022 compared to a 10% drop in the wider market.

The rally was powered by an encouraging earnings update.

So what

BJ's revealed in a Thursday-morning earnings report that sales rose 20% at existing locations in the selling period that ended in late July. That expansion rate falls significantly after gasoline price spikes are accounted for, but the retailer's 8% adjusted growth still translates into market-share gains and rising traffic in a competitive industry.

The company also avoided the profit pitfalls that have hurt the likes of Walmart and Target. Management noted no major price cuts needed to keep merchandise moving or to account for shifting demand trends. Instead, BJ's operating profit margin held steady even as Walmart and Target both reported declines.

Now what

The retailer is planning to add 11 new club locations in 2022 as it slowly expands beyond its regional focus in the northeastern U.S. That growth is well supported by increased traffic at its existing locations.

At the same time, investors could see faster earnings growth ahead as BJ's collects higher membership fees from shoppers increasingly looking for deals in this inflationary environment.

BJ's larger rival Costco Wholesale benefits from these same trends and in some ways is positioned even better to capitalize on today's consumer spending environment. Yet BJ's stock is valued at a discount to the industry leader, and that's another good reason for shares to be up on a flat week for the wider market.