Low amounts of adrenaline, secreted within 30 seconds of learning, have a role in the consolidation of memory. Emotions that produce adrenaline therefore have an effect on the strength of a newly forming memory. The memories that are formed under circumstances of emotional arousal are often vital to survival.
The answer is duplications.
Gene family consists of several similar genes. Duplications of single genes, exons, multigene families, or whole genome have given rise to families of related genes. The example is the globin family of genes in primates. About 500 million years ago, a duplication of single globin gene began. Much later, during primate evolution, the additional duplications occurred together with some point mutations. So the end result is diversity in globin chains that arose from original globin gene.