Huh. I encounter "customers only" signs quite frequently in the US, as well as bathrooms that require codes or keys.
If you're a well groomed adult and walk up to the counter at a coffee shop and ask for the code, they'll usually just give it to you no questions asked.
The selective enforcement is the point, because they use these policies to keep away the "types" of people they don't want in the businesses (i.e. unhoused people, teens, etc).