There are two types of homeless. The temporary homeless who have been caught out by circumstance and work mightily to avoid remaining homeless. These people tend to be homeless only for very short periods of time (days).
Then there are the chronically homeless, who are generally unable to live within societal norms. Many of these people are mentally ill. And for many of these people giving them a home and money will not solve their problems.