Of course they can, at least in the US, however if someone asks for my ID while paying cash I will say "fuck that" and turn around and leave their brick building.
Eh it was more about the affront than security. I know there are eyes in the sky just about everywhere :) . Especially with things like cops tapping into porch cameras.