It only takes one homeless person to ruin any amount of publicly-available space or service.
I mean, certainly cleaning is the major cost of provisioning a public bathroom, and that needs to be carefully considered during the design of such things. but I don't think that makes public restrooms impossible, just more expensive.