Restaurants don't charge you when you're already there as a customer ( as mentioned in my last example)? They charge you when you need to go and use them as a public toilet sometimes ( eg. when it's urgent).
Also, my experience in Germany at a mall food court is that they DO charge you to use the toilet there, even though I was eating there.
If there even are public toilets, if they are open, if they are in a state to be used (and not just an uncleaned mess), if they are free... plenty of reasons to go to a restaurant to use their toilet.
Which might be also paid (assuming they even exist)