In NYC iirc, 20 seats or more and built before 1970 or so also required it. I looked this up once after getting sick of being told there was no bathroom at places that seemed likely to be lying.
If anything, you have to be careful with this in New York specifically, because some of the little boutique hotels have tiny lobbies that don't have a bathroom. Make sure to go for a big brand-name hotel.
The outer boroughs are trickier, but I've found that McDonald's and KFC generally have open bathrooms. And gas stations with attached convenience stores, which do exist in Queens.
0: https://people.com/food/starbucks-bathroom-policy-change-arr...
Used to be the bathroom had a PIN lock, and the PIN was printed on your receipt. (I assumed it rotated regularly)
You can always say you’re waiting for a phone order. But I can’t say I’ve ever been asked.