This, and other statistics like it, are really disingenuous and framed for a very specific interpretation. Here is the actual quote from the article (strikethrough is in the original - not sure why - maybe a bad stat ?):
"The vast majority of the people who are homeless today used to be housed – in San Francisco. According to the city’s 2015 homeless count, 71 percent of the people on the streets were living in San Francisco when they lost their housing. That means seven out of ten homeless people used to be your neighbors – before the tech boom and the eviction epidemic. "
So the presentation here is that average-joe-normal-churchgoer was minding his own business as a lifelong SF resident and was then evicted by an evil landlord, so his apartment could go to a techie, which sent him into a downward spiral to homelessness.
I have not done independent research into this myself, but I have a suspicion that the actual narrative is something like:
"borderline mentally healthy individual moves to San Francisco because it's interesting and fun and romantic (and warm) and, while still on their meds, manages to rent a room or an SRO or something, lives there for a month or two or six, runs out of either money or meds or familial support (or all three) and suffers their financial/emotional/mental breakdown here, on our streets, far from any support or family they have, if they had any at all."
If this suspicion is correct, it doesn't imply we shouldn't be compassionate or helpful or progressive in our responses, but it does suggest that we are importing problems and should consider how we might limit that tendency.
It also does not place some kind of moralistic "maybe they shouldn't be doing drugs in the first place" judgement on people - at the end of the day it is indeed a mental health issue. Just maybe it doesn't need to be our mental health problem.