It wouldn't cost that much to give a small roof and food to every homeless person in my country, and becoming a productive member of society is vastly easier when you don't have to worry about your next meal.
But no, "some might cheat the system", or "it's not fair to give money to lazy bums", etc.
We could basically eradicate homelessness at small economic cost, which I believe would be a net positive on the long term, but we don't because of an irrational fear of the poorest members of society cheating the system.