Many genes with reproductive roles also have antibacterial and immune functions, which indicate that the threat of microbial attack on the sperm or egg may be a major influence on rapid evolution during reproduction.