True, a large part of the problem is that the elimination of non-typical IT professionals happens long before they even apply for the jobs (the same is true of a lot of other professions).
It's often stated that the proportion of students studying computer science degrees who are female has fallen over the last few years. I very much doubt that this is because loads of school-aged young women do work experience at IT firms and decide it's not for them. Rather, it suggests that there are other things putting them off- in all likelihood, stereotypes.
It suggests that the IT industry should be going into schools and tackling the stereotypes there. I say should, because if entry into the field's being restricted by anything other than ability, then the whole field suffers.