The problem is the lack of social responsibility/potty profit seeking in tourist cities and European cities. I was appalled by the lack of public restrooms in Europe when I visited, and its similar in some US tourism cities. Where I live, which is a decent 1m+pop city, every single store has a restroom, and you are allowed to use it, for free. Even secure locations like office towers always have accessible restrooms on the first floor to the public, where they typically have a shop/restaurant floor. A lot of people, when they go into a store to pee, buy something. Staff clean the restrooms as part of their jobs, and you learn which ones are well kept and which ones aren't and go to those stores more often. For example, when I'm driving to the beach, Chick-fil-a is the go-to food stop because their restrooms are always clean.
When I went to Helsinki and Estonia, only ONE store downtown (Stockmans) had a public restroom and it had a 15 minute wait all day every day. No surprise, this store had a buttload of business too. Everywhere else there's these god-awful porta potties that want to charge you 3$ a use. Its miserable. You either walk around dehydrated all the time or plan your day around bathroom breaks.