evolution
All of these animal behaviors are important. They help the animals get food for energy, make sure their young survive, or ensure that they, themselves, survive. Behaviors that help animals or their young survive, increase the animals fitness. Animals with higher fitness have a better chance of passing their genes on to the next generation. If genes control behaviors that increase fitness, the behaviors become more common in the species. This occurs through the process of evolution by natural selection.