People will naturally make assumptions based on prior experiences and statistics , essentially "optimising for the common case". In the same way that I would make an assumption that somebody from say Pakistan is more likely to be a muslim than christian.
This is simply how humans operate, probably because it has survival value and is more a function of evolution than prejudice.
It's not a difficult assumption to get past anyway, talking knowledgeably about something a recruiter would probably not know or even wearing a tech related T shirt would make people change their assumptions.
The only way to solve that particular problem properly would be to have more women in tech.
An actual barrier would be a company or a CS programme deliberately discriminating against women by not employing them. Now I'm sure this does happen in some cases and would be difficult to gather evidence of because any company admitting to this practice would be open to law suits. Another example would be of creating a workplace that was somehow misogynistic in some way, but I actually find that more common in other industries than in tech.
OTOH , many universities seem to actually discriminate in favour of women for CS, in some cases lowering entry requirements on giving a priority on placement. They still tend to end up with 80%+ men though.
One observation I have made about women who work as developers or in an engineering/science field is that the majority I have met have tended to be chinese. This makes me wonder if there is in fact a stigma attached to western women going into tech but I don't necessarily think this stigma comes from the inside.