It is not a law that you must show your receipt at the door.
I won’t get in a line (again) to get out of the store.
If no one is stopped ahead of me, I will show my receipt, but I won’t let go of it and I won’t stop my progress towards my car.Otherwise, I walk past the line.
The stores doing this are saying they suspect you may be a thief.
You are wrong on so many levels. Costco is a membership only club that you pay to join and agree to the check. Since you agree to this when you join, you can be held accountable for not doing so.