Lets imagine you do a human study that measure the incentives and disincentives of seeking high income job, based on gender. What would the results be?
How does society treat men who do not prioritize work income in life vs men who prioritize work income over other aspects in life.
How does society treat women who prioritize other aspect of life over work income vs women who prioritize work income?
After measuring that and how high the amplitude is, we can rather easily see the building blocks of the pay gap.
To take a bit of data from Sweden, a man who is in the bottom 50% of the income pool has less than half the probability of having children of his own. Increased income has a very strong correlation with fathering children. For women this is the opposite with fewer children at higher income, but the amplitude is significant smaller than for men. The difference in children between high income and low income women exist but is comparable small.
If we could align those incentives so they point in the same direction and with the same amplitude then those two children, one male, one female, would likely end up with the same income later in life.