Exactly and if it were true (which is isn't) the workforce would be on it's way to being almost entirely female, why would a company who are interested in profits hire a man to do the same job when they could get a woman at a significant discount. The pay gap has been well and truly debunked, no serious economist believes in it.
your assumption here is that people are 100% rational and that simply is not true. see all of human history.