Yes. I know a number of people (some women, some not) who were excellent software engineers, sharp minds, good at teasing a part a puzzle who have left the field.
People balance quality of life together with compensation (and whether the opportunity is interesting), or everyone would be trying to become an investment banker.
It is certainly the case that if being a woman software engineer sucks more than being a man software engineer that calculus may result in clearly delineated differentials like the ones we see today.