The number two reason for the pay gap is motherhood. If you have a man and woman who have the same education and background and joined the company at the same time. but over twenty years the woman took off four years to have some kids, is it fair that the man is now ahead of her? I don't know what's fair in the grand scheme of things, but as far as the employer is concerned, she gets more consistent work out of the male employee.
We could decide as a society that business should help pay for the next generation. Maybe that is right on moral grounds, but if an employer is obligated to provide daycare, breast milk pumping areas, or other accomodations for mothers than there is no such thing as an equally qualified male and female candidate. If their qualifications are the same, the male is objectively better from a financial point of view.
The Americans with Disabilities Act prohibits discrimination on the grounds of a person having a disability, but the passage of the ADA has not improved disabled people's job prospects. They are just not hired. The hiring people cannot say "I didn't hire you because of your diability" so they will make up a neutral excuse "We found a better candidate." This will happen to women as a whole, if laws force major special accomodations for women in the workplace.
We have that now! There is a big problem of talented female doctors and lawyers quitting in their mid thirties to focus on their family and never come back.
Another portion of the paygap is that men take more dangerous jobs, men take more jobs that work outside, men take more jobs that are dirty, men take more jobs with irregular hours.
Men take fewer sick days than women on average even certain things like the common cold actually hit men harder or more often. Men are more likely to work through the pain. That's probably why women tend to outlive men by 6-8 years on average. That and the disproportionate war death, homicide death, suicide death, and accident death thing.
Testoterone helps people cope with stress. Men have more testosterone. Men tend to outperform women in high stress jobs. The downside is powering through stress causes a strain on long term health. Again the eight year life gap again.
On average men and women are about the same in terms of IQ, but men have more variance. Men have more geniuses and more morons than women have. This is why men dominate multi-million dollar CEO jobs by a wide margin and this is why men are more likely to be homeless.
Not just IQ, but work ethic too. Men have more lazy people and more insane workaholics than women have.
Men have more upper body strength. This doesn't matter for most jobs, but it matters for some. If you see a group of road workers 4 men and 1 woman. The men are doing the road work and the woman is holding the sign. Among firefighters the female firefighters stay with the truck while the men climb the ladders or knock down the doors.