Here are some links to studies on the motherhood pay gap which address your naive supposition that there is no discrimination against mothers taking place.
https://www.aauw.org/issues/equity/motherhood/
"Research has shown that hiring managers are less likely to hire mothers compared women who don’t have kids, and when employers do make an offer to a mother, they offer her a lower salary than they do other women. Men, by contrast, do not suffer a penalty when they become dads. In fact, there’s some evidence of a “fatherhood bonus” in which their earnings actually increase."
https://news.cornell.edu/stories/2005/08/mothers-face-disadvantages-getting-hired-study-shows
"Mothers looking for employment face disadvantages, including being less likely to be hired, being offered lower salaries and facing a perception that they would be less committed to a job than fathers or women without children, according to an experiment conducted by researchers at Cornell University."