Those sorts of generalisations are sexist, but they're often so normalised (the 'marinade' of sexism is a good metaphor) that they're more a fault of society than inherent to the individual.
I really dislike calling these sorts of things, which are really just internal statistical judgements, sexist, I think it's misleading and leads to emphasis on things that aren't really problems and can't be changed.
Brains work by categorisation, and by looking at what happens most of the time under various circumstances and judging the probability of various possibilities. It has to work that way, we can't not notice, for example, that most builders are men, and if we say we always think it is equally likely that a given unknown builder could be male or female, we are probably telling a lie, to ourselves if no one else.
And for that matter, it's not just intuitive judgements, it's how statistical analysis works, and it's how science works. Without this sort of categorisation and noticing patters, we can't have either of those things.
We might think most builders are men because of sexism, but we don't avoid being sexists ourselves because we pretend we don't know its true that they are. We just get practice at pretending the obvious isn't obvious.