Home Depot (HD -1.29%) ran a hugely successful retailing business even before the pandemic sparked a much higher demand for its home improvement products. Yet shares have underperformed the market in 2022 on fears of a slowdown in the housing market or a major growth hangover following several years of spiking demand.

The company's recent earnings update eased those concerns and showed that the chain is still likely to grow sales and earnings in 2022 at a solid clip. But one metric stood out as the best news that investors could hope for.

Let's take a closer look at why Home Depot's profitability is such a clear sign of market-beating shareholder returns ahead.

Winning market share

It is much harder to achieve steady or expanding profit margin when sales trends are weak. Luckily, Home Depot isn't facing that challenge today.

Comparable-store sales were up 5% in the core U.S. market on top of the prior year's 3.4% increase. Second-quarter revenue landed at $44 billion compared to $38 billion in the same period in 2020. "We delivered the highest quarterly sales and earnings in our company's history," CEO Ted Decker pointed out in a press release.

While investors were happy to see no evidence of collapsing demand, the better news centered around profits. Home Depot endured just a small drop in gross profit margin despite soaring costs. Management didn't face the same inventory challenges that hurt earnings for companies like Walmart (WMT 0.08%) and Target (TGT -3.04%) in recent months.

These peers both complained about the need for price cuts to keep inventory moving on bulky categories like outdoor furniture. Home Depot didn't need similar cuts this quarter.

Rising operating margin

The company also demonstrated its impressive efficiency by lowering selling expenses at a time when many rivals are showing much higher operating costs. As a result, operating income rose to $7.2 billion, or 16.4% of sales, compared to $6.6 billion, or 16% of sales.

LOW Operating Margin (TTM) Chart

LOW Operating Margin (TTM) data by YCharts.

Investors should look at that rising profitability as a highly bullish sign in any environment but especially at a time when so many other retailers are warning about falling margins.

Looking ahead

This outperformance gave Decker and his team confidence to affirm their wider 2022 outlook that calls for earnings growth that outpaces the 3% sales increase that executives are expecting this year. Since Home Depot aims to return around 55% of annual earnings as dividends, shareholders can feel more confident about a significant income boost ahead for 2023.

Gushing cash flow, meanwhile, likely means continued heavy spending on stock buybacks, which total $4 billion over just the last six months.

It is still possible that Home Depot will endure a harder growth slowdown in the second half of the year, especially if the housing market cools quickly. And a recession would surely reduce short-term earnings expectations for this retailing giant.

But investors should look through that noise and focus on Home Depot's bigger picture. The industry leader isn't simply growing faster than rivals. It is also profiting more from its highly efficient business. That success is bound to translate into positive shareholder returns over time.