I don't like reductive economics logic over what is a humane response, but I do like that it may not only be nicer, but actually financially sensible.
Your reductive suggestion could be implemented by busing the homeless to prisons. That's probably not what you were proposing, but it's one interpretation.