About 100 years ago, women were explicitly forbidden from most colleges and universities. The attitude that women aren't cut out for, and should be excluded from STEM dates back to Socrates (~400 bce), at least. I'm not a historian but that wasn't terribly long after Greeks started writing things down.