I tend to think a lot of the social programs that do exist in this city (and there are many – healthy san francisco, housing subsidies, dozens of shelters, and even more food programs) don't really address the root problem that causes such a disparity. For instance, I've a number of friends who work in the tenderloin with some of those same social programs, and they're perspective is that the housing subsidies that bring people to the tenderloin only exacerbate the issues that plague it.
It's not just warm weather that draws people to SF, but a plethora of social programs that are often poorly executed, underfunded, and addressed at superficial issues and not their core causes (education, for example).