Pajamas were once upon a time (not so long ago) considered a luxury and the few that could afford them would show them off by wearing them around town. A few Chinese still wear them around these days to show that they can afford them.
During the World Expo the government didn't want people who were visiting to think that the Chinese were weird and started rounding up anybody they saw in pajamas and not letting them wonder the city wearing them. Since the world expo has been over for a while now, they are starting to show up again.
This pic was taken at Carrefore, the European Walmart, at 2 in the afternoon. At least they were comfy while shopping!