I question the legality of checking receipts. The stuff I purchased is my property and I don’t feel they have the right to search me, especially since I’ve obviously come from the checkout area.
I don’t know what the legal status of it is.
Evidently you don’t shop at Costco, Sam’s club or any of the various warehouse style establishments. It’s in the membership agreement. Asking for a receipt is quite common at many stores, even if they don’t have a sign posted.
This is especially true in less secure parts of town.