It has always been that the lazy or barely-competent men wanted to keep women out of the competition for their work. It has also been for a long time that the rest of men welcomed anyone, and was civilised to anyone joining them in their occupation, having the confidence to cope with the competitors. That is what makes the sexist boors look so pathetic: it is a position primarily taken by people who are not confident, so they tend to be bullies, tend not to be good at their jobs and not willing to work for their position.