I've pondered this off and on for a long time. If little boys are raised almost entirely by their mothers rather than their fathers, why do so many turn out sexist?
Part of it must be the fact that parents are less important in forming opinions than peers, including sibs. The peers of Cain, Eve's first son, were wild animals, so maybe he got his ideas from baboons, and every male since has had that continued influence from its peer group. (Do I have to put irony marks around things like that? I thought not.) But parents do have some influence, so why does sexism exist?
I suspect sexism is as biologically based as religiosity or political orientation, or reading ability, or the number of brain cells, or alcoholism, or autism, or lying, or tameness, or sexual orientation, or liking to bet on long shots, schizophrenia, or lots of other behavioral characteristics. Why should a man's attitude toward women be less subject to biological influences than being politically liberal or conservative? The relationship between the sexes is pretty important for any animal.
So I expect that, over a period of hundreds of thousands or millions of years, males who were sexist were more successful at having surviving babies than sensitive men. And part of that is what the women wanted, and apparently still want. At least in the US, the males typically present themselves, and women say yes or no. One assumes that female selection is as big a part of human evolution as it is in other apes. So women are partly responsible for biological sexism's persistence by frequently mating with sexist men. It's a staple of fiction as well as life.
What brought this to mind is an article a couple of days ago in the LA Times. Some researchers looked at math ability and math attitudes at the beginning and end of the school year for 117 first and second graders and at the math anxiety level (not math ability) of their 7 teachers, all female. By the end of the school year, 20 of the 65 girls "subscribed to the math-is-for-boys stereotype" and scored 5% lower on a test of counting shapes and doing simple addition and subtraction. Boys and the other 45 girls both scored the same.
So somehow the teachers transmitted their anxiety to some students (and one presumes, though I haven't looked at the actual study, that some of the newly anxious girls were in classes with confident teachers). I wonder what would happen if they did it with male teachers. Would math-anxious male teachers produce math-anxious boy students?
Speculative science to the rescue: I conjecture that the idea that math is a boy thing is related to the whole idea of gender roles, which is related to political orientation. I therefore predict that female math anxiety will turn out to be more common in conservative women than liberals. A prediction of that prediction would be that university math departments would have a mix of conservative and liberal men but mostly liberal women. I'll bet there's a dataset out there that would solve this.
But even if sexism and math-is-a-boy-thingism are biologically influenced, that doesn't mean we have to allow them in polite company. If baboons can change, humans can.