This especially applies to women - sure there are misogynistic jerks that are great coders, but who's to say the women they are putting off wouldn't be better in the long run?
I hear the argument that if someone is dedicated enough they'll overlook the abuse they get and do what they do anyway, but the entire premise of the overarching debate is that social skills don't really correlate with technical skills, which blows that argument out of the water - people might not have the social skills to deal with shitbags, but that doesn't mean they aren't fantastic amazing programmers.