In a free society, lack of diversity is reflective of what happens when people are free to do what they want. To think otherwise is to believe that (for example) women should be forced into tech whether they like it or not.
Not everybody is free to do what they want in that way. Tech is a pretty hostile place for a lot of people so they make a go of it and then leave. Not wanting to put up with a hostile work environment is not being "free". I know a lot of people who would have preferred to stay in tech but were pushed out or prioritized their mental and physical health.