The problem on the streets in SF is 99% drugs and mental illness, maybe 1% housing. Almost all of the people in camps refuse services and shelter when offered.
Nah, it's way more than 1% housing. Even many drug-addicted people can still manage to not be homeless when housing is cheap (especially SROs), and a lot of the drug addiction is downstream of becoming homeless and hanging out with drug addicts all day.
Lack of housing, drug problems, and mental illness are not independent variables. A few months on the streets can push sober folks towards getting high, not to mention hurt one's sanity.