I've met homeless people through my old job and a lot of them wouldn't go into the hostels round here as, despite being promoted as "dry", were actually full of drugs and sadly also were rife with people stealing and fighting. The people I spoke to said they'd prefer to take their chances on the street. One young girl (18yrs old, kicked out of home) was put in one hostel that is known to be dangerous at times. My friend who volunteers there gave the girl advice on how to survive the nights. Other people would prey on the young and more vulnerable. The hostel workers were unable to do much in the face of so much adversity as they were often threatened etc. Personally I did say to my friend that I didn't understand that, ban the bad people, or anyone caught breaking the rules, but she said it's not that easy as it can be difficult to know exactly what is going on, partly as you can't have eyes or CCTV everywhere.
It's such a difficult and complex situation. I don't think anyone has the answer unfortunately.
I try to talk to those I give money to, I offer advice on street vets, shelters, benefits, places I know that offer work or help getting into work that specifically help homeless people. I will also give money if the person seems to be genuine. I probably don't always get it right, but if I end up giving a tenner to someone who uses it to get high, then whilst I would prefer them to have used it towards food or a bed (and yes, some hostels do charge, they're nicer and more like a room rather than a pod or floor space), well that's their choice and I won't judge them for it.
In the summer, I have given out bottled water and sunscreen (nothing fancy, just from Poundland) which was really well received, even from a group of people that I am 99% sure were addicts, but they were so grateful that maybe they genuinely appreciated it. Who knows?