All social animals have the concept of social rank.
Rather than popularity I would rather translate that to: "why nerds are ranked lower in the human social structure". Now, to answer that, you need to standardize in a definition for nerd.
Nerd for some is about superficial traits, whereas for others it is only a descriptor for personality traits, for others it is about intellectual traits, whereas for others it is about interests.
I think the answer lies on how humans, or generalizing, greater apes, rank each other. For example: if you went hunting, who would you take with you in descending order?
Rather than popularity I would rather translate that to: "why nerds are ranked lower in the human social structure". Now, to answer that, you need to standardize in a definition for nerd.
Nerd for some is about superficial traits, whereas for others it is only a descriptor for personality traits, for others it is about intellectual traits, whereas for others it is about interests.
I think the answer lies on how humans, or generalizing, greater apes, rank each other. For example: if you went hunting, who would you take with you in descending order?