Chewy (CHWY -1.42%) shares jumped immediately following the company's first-quarter earnings update. The announcement showed surprisingly strong sales and earnings growth. It turns out that pet owners are prioritizing what they spend in this area even as they pull back on other parts of their budgets.

Yet Chewy's stock is still underperforming the S&P 500 in 2023, implying that Wall Street is more focused on challenges around sluggish industry growth. That's just a short-term issue that's not likely to seriously threaten the bullish investing thesis.

On the other hand, Chewy's expanding profitability is a great sign for the business -- and for shareholders' returns. Let's take a closer look.

Starting strong

The e-commerce specialist is still dealing with a growth hangover from pandemic-related demand spikes in 2020 and 2021. The clearest sign of that pressure is a recent drop in its active shopper base, which shrank by 1% in Q1. The company had seen its base expand by 8% in the prior year as pet adoption rates soared.

There were other encouraging signs around growth and engagement, though. Chewy gained market share, and average annual spending rose a healthy 15% to over $500. Shoppers are enthusiastically using its subscription-based service, too. In other words, Chewy is still very much a growth stock.

Record profitability

The clearer green flag is profitability, which set a record in Q1. Chewy's gross profit margin hit 28.4% of sales, up from 28% in fiscal 2022. Management highlighted several factors pushing this metric higher, including a rebound in demand for more premium pet supplies. Rising prices didn't scare shoppers away, either. "Our customers continue to show durability," Chewy management said in a letter to shareholders, "with no discernable trade down behavior."

Chart showing rise in Chewy's gross profit margin since 2019.

CHWY Gross Profit Margin data by YCharts

This gross profit margin boost has some immediate benefits, including helping adjusted earnings reach a record 4% of sales in Q1. But there are long-term positive effects as well. Chewy's cash flow is solidly positive, for example, and its rate of generation is rising. Higher profitability implies a level of pricing power that could support market-beating annual earnings growth, too.

Looking ahead

Investors don't have to worry about Chewy's international expansion hurting margins. Management said in its announcement that the initial push into Canada won't require significant new capital spending or a period of sub-par profitability.

That means Chewy has a good shot at protecting earnings even if the current sluggish selling environment extends deeper into 2023. Look for margins to expand faster, meanwhile, once the next cyclical upswing hits the industry.

There's no telling when that rebound will occur. But Chewy's growing market share and improving profitability are clear signals that the business is on the right track. Investors have an opportunity to buy this attractive business at a discount, too. Shares are trading at a price-to-sales ratio of just 1.5 today, down from over 6 just before markets started contracting in early 2022.

While Chewy isn't expanding at nearly the same rate it was during those high-demand days, it is generating solid earnings and cash flow. That's great news for investors willing to hold the growth stock through some short-term volatility.