If I own a business with a bathroom it costs me every time someone uses the bathroom. Bathroom use is never free, someone is paying for maintenance and consumables.
Okay it'll cost a lot more if someone pisses on your floor or the outside wall which will happen after a certain amount of severe poverty strikes. Just look at India where people shit in the street.
The same way it's legal for restaurants to charge you for food, even though you can die of starvation.