I know I am going to get downvoted for this
There are more men than women in IT. For whatever reason, that's what we currently have.
So TV shows are written than reflect that situation, simply because that's what exists in the real world (I rather doubt it is a misogynistic cabal plotting to keep women subjugated, us blokes are really not that organised).
I put it to you that is there were more women in a given industry than men, TV shows would be written and represent that imbalance. Would people still complain?
Do all TV shows/films have to represent some platonic ideal of society that we should aspire to? Or should they, by and large, represent what we have?
Obviously if a TV show shows (say) all women as hormonally imbalanced harpies who can't reverse park or change a fuse; then unequivocally that show is either sexist or so absurd and over the top that you are simply missing the joke (because I bet all the men are shown as knuckle dragging lager louts hell-bent on rutting and rugby!)
And one final question - why can't a woman have a man as a role-model (or vice versa)? Can role models only come from the same sex, race, culture, religion, skin-type....?