Men, as a group, will overwhelmingly go after the better paying job even if it the job requires nights and/or weekends, extensive travel, dirty work, working for a company they don't like or agree with, or in other ways giving up personal comfort and/or satisfaction.
We are talking about pay for exactly the same job. Two people similarly qualified and with similar experience, one male and one female doing the same job. Often there is some obfuscation, like giving the two slightly different job titles that idiots can then latch on as proof it isn't the same, but it is.
Many women choose to stay home for a year or more to have and raise children, which necessitates the men continuing to work and possibly working more hours to make up for the loss of income
All women should not be disadvantaged by the choices of a subset of them. Again, there is plenty of research showing that women of child bearing age find it harder to get a job in the first place because employers assume they will want maternity leave. Just google "employing child bearing age women" and start reading.
And yes, men do need to cover women taking time out for children to some extent. Society needs children. Society needs women to have children and take some time to bring them up. If that doesn't happen we will end up like Japan, with a massively declining population and all the problems that go with it. If you look at it as "that bitch in my office is going on maternity leave and I have to do all her work and mine now" then yeah, it seems unfair. If your employer doesn't screw you with overwork and you consider that in 30 or 40 years time there will be a doctor to look after you or a shop working to pay tax that in turn pays your pension because you helped create another valuable member of society you might feel better about it.