Because nobody wants to live there? That's why it's cheap.
I fear a lot of SF homeless enjoy being in SF for similar reasons that a lot of the not-homeless do. Can the prospect of free housing in a random area lure them away? Maybe? It's hard to say.
Overheard a homeless guy in Mountain View, think he had a tent in one of the creek beds, saying why he likes it here: - βit's safe, you don't get robbed". Less risk of violent crime in a prosperous, liberal city like MV, where the police management know they're expected to roll a car for reports of homeless-on-homeless violence, and can easily afford to do so.