Evolution of descended testes in mammals
Mammals are the only animals in which the testes descend from their point of origin into a scrotum. Concurrently, mammals are the only class of vertebrates to evolve a prostate gland starting with prostate evolution in monotreme mammals. Testicular descent occurs to a variable degree in various mammals, ranging from virtually no change of position from the abdominal cavity (monotremes, elephants and hyraxes); through migration to the caudal end of the abdominal cavity (armadillos, whales and dolphins); migration just through the abdominal wall (hedgehogs, moles, seals); formation of a sub-anal swelling (pigs, rodents ); to the development of pronounced scrota (primates, dogs, ruminants) in mammals. Since descent of the testes into a scrotal pouch subjects the animal to enhanced risk of accidental damage and/or vulnerability from predators and rivals, presumably there must be some evolutionary adaptive advantage to testicular descent. It has been proposed that the scrotum may act as a form of sexual decoration. A scrotal location also exposes the testes to a reduced temperature below that of the body, which has been suggested to reduce the spontaneous rate of germ cell mutations. Mechanism for the sperm storage region of the epididymis promoting  testicular descent. An alternative proposal is that testicular descent was preceded, and possibly influenced, by migration of the sperm storage region of the epididymis to a cooler extra-abdominal location. The evolutionary adaptive advantage of testicular descent into an extra-abdominal position may be related more to the enhanced sperm storage capacity of the epididymis at lower extra-abdominal temperatures than to the testis itself. Greater sperm storage capacity in the epididymis has been associated with enhanced fertility. In this context, the proportion (26% of total) of mature sperm stored intra-abdominally in the monotreme epididymis is considerably less than  the proportion of mature sperm stored in the epididymis of many eutherian mammals (50-75% of total) with descended testes. Moreover, this increase in scrotal storage of sperm corresponds with epididymis evolution from reptiles to mammals. The mechanism by which sperm storage in the epididymis is enhanced at lower extra-abdominal temperatures has been shown to be a consequence of the biophysics of oxygen availability and sperm oxidative respiration. The cauda epididymis, where sperm are stored, can be up to 7 °C below abdominal temperatures. For a reduction in temperature of 7 °C the respiration rate of sperm  declines by one half, and the solubility of oxygen is solution increases by approximately 10%. Hence for a reduction in temperature of 7 °C the availability of oxygen is doubled, and hence twice as many sperm can be stored per unit volume of epididymal duct. This increased sperm reserve at lower extra-abdominal temperatures has been related to enhanced fertility which provides an evolutionary advantage to the survival of the species. In conclusion, the evolution of descended testes was promoted by the lower extra-abdominal temperature of the cauda epididymis which increased oxygen availability to sustain and store more  sperm.