I live in a "bad" part of SF, by choice - I have a huge, cheap apartment. Until about 5 or so years ago, the homeless situation was not that bad around me. There would be periods where people with problems would be around, but generally it wasn't a big deal. I'd clean up around my and my downstairs neighbor's doors, and a bit wider if needed. Some of the folks that used to live on the street here would also help keep things clean.
Then the cops decided we are good place to funnel campers. Inevitably, dealers followed, and the street went to hell.
I won't go in to all the ins and outs, I can become very boring on this topic. Suffice to say, when you have a local small business that considers piles of garbage a competitive advantage, sweeping out my bit of sidewalk became pointless.