Correlation doesn't equal causation. Having lived in SF during that period, there was a lot of governmental policy that contributed to that rise in homelessness. Saw the same thing in Oregon: homelessness increased when housing prices increased but there was also measure 110 which decriminalized all drugs. SF's similarly lax policies probably have more to do with their homeless issue than their housing prices. If it were purely housing prices, these people would just move to somewhere cheaper. And before you say, they can't move, they surely could move into Oregon when meth became de facto legal.
For a lot of addicts, the criminal justice system is their only chance at substance abuse help (mostly because they won't seek it on their own on the outside as we've seen in Oregon).