I have a young child, and that is an absolute free pass to nearly any bathroom anywhere. My kid is very cute and charismatic to boot, so I'm half certain I could make our way into Area 51 or the Vatican archives if we found ourselves with a full bladder.
Not paying for bathrooms is a distinctly American thing in the Western world. For instance, the McDonalds I used to go to all the time in Sweden actually has a credit card reader on the door.
British slang for going to the toilet is (or used to be) to "spend a penny" since some public bathrooms required you to put a large pre-decimal penny to open the stall door lock.
I was genuinely shocked to follow signs to a WC in a Brussels train station and find a pay toilet. Stupid thing wouldn't take my CC so when nature calls... I stepped outside the station and was hit with a slap of piss stink. Makes sense! Added my own, what else am I to do?
I loved my time in Brussels but it really was gross how often I'd randomly smell piss.
There are open air urinals in a lot of Europe, including Brussels, so as long as that's what you need (and you're male)... I imagine stations are just so high traffic that it's partly an attempt to limit demand, and partly to fund the almost continual cleaning necessary to prevent them being completely disgusting. Kings Cross is paid too for example (but not (London) Waterloo, curiously).
Many places are now putting codes on the restroom door that you have to ask for. Whether or not they'll give you the code before buying something varies a lot by location and likely by how much the employee gives a shit.