Computer programming once had much better gender balance than it does today. What went wrong?

I can’t find the data (my google skills are failing me), but women in other sciences is much higher than CS or Math. So the argument about girls not being interested in science is wrong. I even saw an article (again with charts that showed the numbers), saying that CS and Math were losing bright science-loving women to Bio because Bio was more welcoming to women. The numbers of women in Medical school is also high.