A lot of the issue is that people rich/smart enough to move to SF now (vs. those who pre-existed) value education. They're not going to send their kids to SF public schools, so they move to Hillsborough or Palo Alto for the schools. That leaves a population of 20-30s childless people, who are more likely to be liberal, and old hippies, the same.