What sickens me is that people look at ludicrous phenomena like locked bathrooms, or like putting fucking spikes on public benches, and go "Oh, well, you know, those homeless are why we can't have nice things." As if hordes of crazy homeless people are some sort of irresistible natural phenomenon, like locusts, and not something that anyone could possibly do something about. Especially not something that might conceivably have to be paid for with tax money.
They exist because there isn't mental health funding to house and manage them. It's a tragedy of the commons problem.
In the downtown districts of San Francisco that aren't FiDi, there are usually-operational free public toilets. There aren't enough of them, and they too-often out of service, but they do exist.
There aren't as many public toilets as there used to be, but there are still enough (I'm sure homeless people know where they are), and it's rare for there to be a lock on the toilets in larger businesses.
Railway stations in London generally change 20p.
And then people complain that homeless folks do their business on the streets. Well, what the fuck else are they gonna do? Eeesh.