It is a public space. You wear appropriate clothes when you’re in a space you shared with other people. Pajamas are sleeping wear, or for some “pambahay”. What, are you going to sleep in the grocery? Common courtesy is a thing, you know. Hindi bahay ang grocery.