I'm not claiming it's a conscious decision to say more men are in that job so let's now pay it more. Only about 2% of thought is conscious according to cognitive science. Most discrimination is due to unconscious bias and relates to acting out cultural narratives and beliefs without even being aware that it's taking place. You know what happens to women who actively self-promote and try to negotiate for proper salaries and raises? More often then not they get labeled as aggressive and unprofessional (because the cultural expectation is that while that's appropriate for men, women are supposed to be agreeable, docile, and accomodating).
And how do you explain that janitors make more than maids?