glad you brought those up. Sexism can indeed happen anywhere. No one is saying it doesn't happen (I hope)
However it's not conclusive whether sexism towards men or sexism towards women has made the ratios the way they are. Surely it's some factor, but how much?
Many professions that used to be nearly 100% male are now more than 50% women, while some that used to be nearly 100% has stayed well below 50% women. Why is that? Sexism doesn't explain it for me because that implies people in some professions are inherently more sexist than others and I'm not convinced of that