From above " gendered interests are predicted by exposure to prenatal testosterone – higher levels are associated with a preference for mechanically interesting things and occupations in adulthood. Lower levels are associated with a preference for people-oriented activities and occupations. This is why STEM (science, technology, engineering and mathematics) fields tend to be dominated by men."

Sounds like you're implying that correlation is causation. Male exposure to testosterone in the prenatal stage means a higher probability of going into STEM fields of study, and so higher income, no matter what happens in between. Suppose there was a confounding variable, say, a society of parents that don't typically buy science or engineering toys for girls because they aren't feminine.