Let me explain. The authorities there made it ok for people to do that. Police will not arrest you. You can use the streets as your bathroom. They even announced it on the local news (around 2014-2015). Either they are too stupid to realize people would take advantage of that, or they are malevolent and wanted to destroy SF for whatever political reason.