Chinese residents wear protective masks as they do a dance exercise in the street on March 15 in Beijing. (Kevin Frayer/Agence France-Presse/Getty Images)

BEIJING — The grocery stores were brimming with shoppers and produce. Around the corner, a line was forming outside a stall selling pillowy white steamed buns.

The gray, brick-lined alleys of this old imperial capital, deserted several weeks ago, were congested again by newly licensed drivers struggling to park their outsize Audis.