This genetic diversity can provide the variation of physical and behavioural attributes ( phenotypes ) upon which natural selection can act, but, as described below in Section 6, Origin and function of meiosis, the genetic diversity may be largely a by-product of the homologous recombination that is primarily employed for its DNA repair function during meiosis.