I guess the one argument for “public restrooms” is rest areas along major highways and restrooms in public (usually national or state, not little municipal) parks.
So we do have public restrooms…they’re just nowhere near 99% of the population most of the time.
Even when you CAN do this, it’s usually because the employees are either kind enough or inattentive enough to let you do this. And if you are clearly unhoused or poor, your chances of being able to do this are much, much lower than if you can fit in in a middle class white area. (Restaurants with predominantly poor clientele or many homeless people nearby tend to be much stricter about this.)