Not just in tech, but in our entire culture. As noted elsewhere, Americans are sorting themselves by demographics.
It feels awkward to be a woman in a predominantly male organization. It feels awkward to be a republican in San Francisco. It feels awkward to be gay in Mississippi. It feels awkward to be black in Portland. And so we place ourselves in locations (and organizations) where it's less awkward to be ourselves, and the problem gets worse.
What's difficult about this problem is that it's nobody's fault. There's no conspiracy behind this trend. (In fact there is a conspiracy to try and reverse it! But to little avail.) Counterintuitively, perhaps it's the fault of the people who choose the comfort of sameness over diversity, but that feels too close to victim blaming.