I've been homeless twice. Thankfully I had a car and I could live out of it temporarily while I found some family to save my ass while I got back on my feet.
If I hadn't had family keep me from rock bottom it's hard to say if I would have pulled out of those situations on my own.
Unfortunately for many people they have little to no empathy for homeless because they have been lied to or attacked by homeless and they then view all homeless that way.
I remember once in my teens I skateboarded over to a sandwich place to get lunch for myself and my brother. On the way there I passed a homeless guy with a sign asking for "anything". I decided to get him a sandwich while I was there. Just a basic turkey sandwich or something as plain as I could think of. When I tried to give him the sandwich he threw it back at me and told me I should have just given him the money so he could get drunk.
That experience really tainted my view of the homeless from that day onwards. Then later in life I would have two different girlfriends get grabbed by homeless people over the years.
I have a buddy that lived downtown and the homeless people there were always breaking their windows and stealing their stuff. One of them set fire to the side of their house out of boredom. When the police came they just escorted him to the street and then left. He didn't get tried for arson or anything. The cops don't care. They have no system in place to deal with those people.
Its easy for people to have empathy for a group that they have never interacted with. Anyone who lives near homeless or regularly interacts with homeless people will tell you that not all of them are good people who just got abandoned by society. Some of them are evil bad people who have refused help or just don't want it. Most of them need mental support.
It's a very complicated issue and I dont think it has any easy or cheap solutions.