Perhaps this is dong wittingly. Health care, education, and law are all fields that offer secure, local, long-term employment with excellent maternity benefits. Physicists, mathematicians, and other hard science fields often provide much less reliable employment, frequently with travel requirements (academics typically do not get to spend their careers in one place) and excessive time commitments required. Put simply, women steer clear of STEM jobs because they stink if you want to reproduce.
Want to make STEM jobs attractive to women? Start rewarding scientists in measure with their education investment. Stop treating grad students and post-docs worse than pipe-fitters and welders.