The issue is insular identity groups tend to be assholes towards anyone who isn't like them. The have a circle the wagons mentality, and develop outsized hostility towards people outside the group.
When you are in a more diverse space, people don't get this luxury as much. They have to moderate their attitude and behaviour because they can't just dismiss and demonize everyone who isn't like them. As a group becomes more insular, this starts to erode and self-selection happens where moderate folks don't want to be around the miserable angry identity focused people. Eventually a tipping point hits and the diverse space becomes highly insular and ever it's members more extreme and becomes totally hostile to diversity.
That's a well-documented psychological/anthropological thing in real world and online communities. And it's happening in a lot of places, especially those that were previously bastions of diversity and inclusion, like college campuses and online communities.
And SF suffers from the same issue as where I live, the population is very insular in terms of demographics and identity. You can't live here anymore unless you make like 100K+ a year, which severely restricts the types of people who can live here to very similar demographics.