Genetic variety in sexual reproduction arises primarily through two mechanisms: independent assortment and genetic recombination. While homologous chromosomes have the same genes, they can have different versions of those genes, called alleles. During meiosis, these homologous chromosomes undergo independent assortment, meaning they line up randomly, leading to different combinations of alleles in the resulting gametes. Additionally, genetic recombination occurs during crossing over, where segments of homologous chromosomes are exchanged, further shuffling alleles and creating new combinations of genes in offspring. Thus, even though the genes are the same, the different combinations of alleles generated through independent assortment and genetic recombination result in genetic variety among offspring.
Hope this helps!