The thing that always got me as a kid was that as a boy, if you showed any signs of a technical aptitude in STEM and your parents found out, they'd practically have your life planned out right then and there, you'd get lots of "Oh, you can be an engineer then", or "you could become a scientist", but girls showing aptitude in STEM would basically get "Oh that's nice, tell me if you need anything". Girls seemed to have the same if not better grades on average, but girls in the advanced classes never seemed to have been pushed in the same way.
That's my memory of it anyway, boys got pushed to go into STEM the second they showed any aptitude, girls were just sort of expected to keep it up.