Women get pregnant, men do not.
This, of course, is an excessive simplification, but it is the basis of many differences between men and women, including the pay gap. Women who become pregnant are therefore considered providers. That's why men work more dangerously to earn more. That's why men work overtime. That's why men work more hours than women.
There are many who show many studies that the primary causes of the gender pay gap are men and women who make various labor decisions The Equal Pay Act of 1963 makes it illegal to pay women for equal work.
The real question is why the myth of gender discrimination still exists, given the equal pay law and the numerous studies that show how women make different work decisions than men. The answer can be summarized in one word: feminism.