If I have any gender prejudices when it comes to work, it is in favour of women, particularly when it comes to young people. If I had to choose to assign a task to a young man or a young woman, all things being equal, I would choose the latter. In my experience, the young man would come back and tell me the reasons why he was unable to complete the task, whereas the young woman would tell you how she overcame various obstacles to complete it. This is a generalisation, of course, and the situation with young men changes once they reach their late twenties, whereupon they tend to step up and start shouldering responsibility, and thereafter often outperform their female peers. It also doesn't apply to physically demanding jobs, where the much greater average body strength of men invariably enables them to outperform women.
People often do not realise how great are the differences in physical strength between the sexes. Women have only about 60% of men's strength for the same body weight (e.g. see this study) and given men in Western countries also average about 15 - 20% greater bodyweight than women, the average man has nearly twice the strength of an average woman.
The differences between men and women are not just physical. Psychologists will tell you there are significant differences between men and women in the main personality traits. Men are higher on average in emotional stability, dominance, rule-consciousness and vigilance traits, whereas women are higher in sensitivity, warmth, and apprehension traits (e.g. see this study). Men are more interested in things and women are more interested in people (e.g. see this study). There is no significant difference in average intelligence between the sexes but the distribution curve for IQ is flatter for men than for women (e.g. see this study). This means there are more men than women of significantly lower intelligence and more men at the high end of the distribution.
These factors are enough to account for the marked differences in representation of men and women in different occupations. The physical differences explain why most firefighters, building labourers, dockers and forestry workers are men. It is also the main reason why throughout history men have been the soldiers, when the very survival of a society depended on its ability to field its strongest army. The psychological differences explain much of the preferences for men to take jobs that involve building things - such as engineering - and women for jobs that involve dealing with people - such as nursing and teaching. The relative flatness of men's intelligence distribution may also explain why men tend to do more manual labour jobs and why there are more men in fields requiring very high IQ such as theoretical mathematics.
So does this mean we should just accept the differences in representation of men and women in different occupations? Well, perhaps we should reverse the question and ask why is the difference in representation a problem? And what is the solution anyway? Do policies that are designed to ensure more equal representation of the sexes in traditionally unequal occupations work? It turns out the answer to the last question is no. In what has been dubbed the 'gender equality paradox', the most egalitarian countries often have some of the worst representation of women in non-traditional fields such as STEM, and compare poorly to less egalitarian countries such as Islamic nations.
In New Zealand, the government has just announced that the public service has two and a half years to "end pay discrimination against women'. The Minister of Women's Affairs, Julie-Anne Genter suggested the key to this was "making flexi working hours the norm", which suggests she understands that the problem isn't discrimination at all but rather the fact that women work different (i.e. less) working hours than men. This is the reality - men earn more because they work more hours and longer continuous service than women. And the main reason for that is that women take time off to have children. In fact, young, single women already out-earn men in most Western countries (see articles here, here and here).
What so-called pay equity advocates actually want is for women to be paid more than men for the same work, because that is the only way women are going to earn the same as men for working less hours or less continuous service. They expect female workers to be paid, say, 20% more per hour than the men doing the same jobs alongside them. Do they really think men are going to stand for that?
I'll leave you with a video on history according to sociology professors, which is sort of relevant to this post.