Retail sales came back in a big way last month. That came about both despite the rise of the Omicron variant and because of it.

The Commerce Department on Wednesday reported that retail sales rose a seasonally adjusted 3.8% in January from December, far better than the 2.1% bounce economists expected to see. Even after factoring in downward revisions to December sales figures, it was a very solid report.

And...

Retail sales came back in a big way last month. That came about both despite the rise of the Omicron variant and because of it.

The Commerce Department on Wednesday reported that retail sales rose a seasonally adjusted 3.8% in January from December, far better than the 2.1% bounce economists expected to see. Even after factoring in downward revisions to December sales figures, it was a very solid report.

And considering how bad the pandemic got last month—there were 20.2 million new Covid-19 cases in January, according to the Centers for Disease Control and Prevention, versus 6.4 million in December and 2.6 million in November—it was also somewhat curious.

But the retail sales report is mostly a reflection of spending on goods rather than services. The one services component of it—spending at food services and drinking places—accounts for just over one-tenth of overall sales. Yet spending on services—which includes everything from hotel stays to haircuts—came to 65% of consumer spending last year.

Sales at food services and drinking places were one of the few places where Wednesday’s report showed a sales decline. That makes sense—worries about the Omicron variant, and just the fact that so many Americans were sick, cut into plans to dine out. And although other services aren’t included in the report, credit- and bank-card figures show that spending on categories such as airfares also weakened.

So instead of spending on services, people spent on stuff instead. Especially noteworthy in Wednesday’s report was a 14.5% increase in sales at nonstore retailers—a category that is dominated by internet sellers such as Amazon.com —from a month earlier.

Still, even though Omicron might have induced a shift toward more spending on goods, it is notable that people kept spending. One can imagine a scenario where people reacted to the sharp rise in Covid cases with caution. Instead, Wednesday’s report suggests they viewed it as a temporary setback.

With Covid cases now falling sharply, what comes next? Already, card-spending figures suggest that people are getting back to eating out and traveling. So perhaps the February retail sales report will show that people’s penchant for buying goods has waned.

SHARE YOUR THOUGHTS

How have your spending habits changed in recent months? Join the conversation below.

It might not wane all that much, at least in the near term, however. Supply-chain challenges have probably led many people to delay certain purchases until there is better availability. And people who have moved to the suburbs from cities during the pandemic will likely continue to have more goods in their spending baskets than before.

That sets the stage for what could be for some very strong spending figures in the months to come, particularly if people believe that with fading Omicron, some sort of return to normality beckons. Hold on to your hats.

Write to Justin Lahart at justin.lahart@wsj.com