Genes are selected during the process of meiosis, where diploid cells undergo division to create haploid gametes (sperm or eggs). This process involves two key steps: the extrusion of half the chromosomes into polar bodies, resulting in a loss of genetic information, and recombination, where homologous chromosomes exchange genetic material. This shuffling of chromosomes enhances genetic diversity. While it may seem that genes are selected randomly, it's crucial that each gamete receives one copy of each chromosome, achieved through careful alignment and segregation during meiosis. This ensures that each sperm or egg has the potential to contribute to the genetic makeup of a unique individual.