Although at least in prison, they'll at least get a chance to get some medical care. Housing them won't help there. This is why we need universal healthcare.
The types of homeless people who are best helped by "housing first" type aid are not the same ones getting arrested/going to prison. Homeless people aren't some big monolithic group you can throw one solution at and have it work...
Even if you're going to overly simplify things you'd at the very least have two groups; the "entrenched" group (more visible and what people think of when talking about homelessness), and "invisible" group (the ones where the factors causing their homelessness are mostly financial).
Just do what my town does. Pay to put them in a hotel where it's $100 a night for tax payers, they don't get a kitchen or space, but at least it doesn't look like we're giving free homes to them!
It's not always the case of a bed existing, in NYC a lot of people would rather sleep on the street because the shelters are often unsafe or unsanitary. That's excluding people who have psychological issues who don't want to enter into the shelter system for different reasons.