Looking at this idiocy from a purely practical perspective, surely housing the homeless by sending them to prison is not the most economical solution. I suppose it probably means someone's brother-in-law gets to build more for-profit prisons though.
Might also note that prisons in capitalist states treat the act of housing a prisoner as economic productivity, while activities performed by the houseless are treated as valueless.
When all you care about is economic growth, a very expensive cage is preferable to low rent housing or ignoring the problem. Better for the stock market. Better for the careers of prison guards, wardens, and prosecutors. Better for politicians who get to brag about "clean streets"