Walmart cut its profit outlook. Here’s why that might worry rivals.

The nation’s largest retailer says the rampant rise in prices is changing consumer habits, causing an inventory pileup and aggressive markdowns

A customer shops at a Walmart in Houston this month. The company cut its quarterly and full-year profit forecasts on July 25. Although household spending has been resilient, the rising cost of groceries and gas has prompted some consumers to avoid other parts of the store. (Brandon Bell/Getty Images)

Walmart sounded alarms Monday when it slashed its quarterly and full-year profit forecasts — a warning that so rattled Wall Street, the retailer’s stock went into a nosedive.

Household spending has been resilient this year even in the face of other economic challenges — including scrambled energy markets, supply chain bottlenecks and decades-high inflation. Because consumers power more than two-thirds of the economy, their willingness to spend has been held up as a key counterpoint to views the nation is barreling toward recession.

But the message from the nation’s largest retailer is a sure sign that stubbornly high prices are changing how people spend. The shift not only hurts its bottom line, it leaves more inventory gathering dust on store shelves and in warehouses. That motivates the company to aggressively mark down merchandise that customers may no longer want or can’t afford. What’s more, Walmart’s story may be a harbinger for other retailers and the broader economy. Here’s why.