Agreed. But the way it tends to work is that if (say) 60% of all engineers are men and the rest are women, then a man more closely fits the idea of an engineer that those people who are in charge of giving the chances have in mind, and so they're more likely to prefer a man to a woman.
You sort of run into this chicken/egg problem though: are women underrepresented in engineering because of what I described above (bad), or do they actually have equal opportunities and simply aren't choosing to become engineers (okay), OR do they actually have equal opportunities and are simply not choosing to be engineers just because the profession currently comprises mostly men and they feel discouraged when they see that, even though they're otherwise interested (bad), or etc. etc.