The law of independent assortment states that alleles for different traits are distributed to gametes independently of one another. This principle is foundational in genetics as it explains how genetic variation occurs during meiosis, specifically when genes are located on different chromosomes or far apart on the same chromosome, allowing for different combinations of traits in offspring.