I would surmise that having to deal with a lot of unconscious bias not to mention some outright discrimination, made the ones who stayed work harder and better.
In the 80s and 90s when training Engineer Officers I tended to find the same with female engineers - probably because the ones who succeeded thought that they had to work harder to show that they were as good as the males.