In humans, the testicles hang outside the body to remain about 3C cooler than body temperature for optimum sperm production. Elephants’ testicles sit within their bodies, keeping them hotter than is ideal for sperm production and increasing the risk that the DNA in the sperm will be damaged. Vollrath argues that elephants evolved to produce multiple copies of the p53 gene to repair the DNA damage in their sperm.
Nothing ever evolves “to”. Those who did not have the extra copies did not produce children, therefore the population became dominated by those who did.