There's loads of reasons why women earn less.
Women don't really go for the STEM fields. They go for teaching, childcare. Those jobs pay less than engineering or biomedical sciences.
Women also go on more sick leave than men. Maternity leave included.
If a woman was doing the exact same job as a man, say, a woman is a Credit Controller. And a man was a Credit Controller. They earn the same. The woman then goes on Maternity leave. The man stays. She's earning statutory pay, while he is earning wage.
It is completely illegal to pay men and women a different wage for the same job. but women take more sick leave, therefore get sick pay, not wage.
Obviously, you can't pay a 30 year old male engineer the same as a 30 year old female receptionist. But you HAVE to pay the male and female engineer the same. A male solicitor is going to earn less than a female secretary, but a male secretary will earn the same as a female one, until she (or he!!) goes on sick leave, paterinity/maternity leave.
The main people who are complaining about this, are women with a gender studies degree. If you complain about not getting the same as a man in the STEM field, go into STEM. Then, you have the same pay. As I said, it's illegal to pay less. if a woman has no sick/maternity leave, she gets the same as a man in the same job.