Courtship in animals
Mating ritual evolved because it is advantageous for females to have choice of partners. If the female has sperm from more than one male, then sperm competition comes into play. This is competition between sperms to fertilize the egg (only a single sperm achieves the union). In some insects, the male injects a cocktail of chemicals in the seminal fluid together with the sperm. The chemicals kill off older sperms (from any previous mating), up-regulates females' egg-laying rate, and reduces her desire to re-mate with another male. The cocktail also shortens the female's lifespan, so reducing her likelihood of mating with other males. Also, some females can get rid of the previous male's sperm.