Two things are rarely mentioned
When you compare apples to apples, male vs female engineering manager with similar backgrounds, the pay is the same. In the Bay Area it favors the woman.
Desire has a large part. It’s no coincidence that the countries with the most women in programming are places like India and China, where they are given little choice. If you can do the job, you do it because otherwise poverty.
When women don’t have to, they don’t.