I think it stopped once public bathrooms became used for things other than taking a whizz
Yeah you have to actually hire people to clean them and patrol for homeless weirdos. Which is why in my country they cost money. I never really understood the economics of public restrooms in America. Who pays for them?
But to answer your question, public things are paid for by the public.