Selection and a changing environment
Which variant is fittest depends on the environment, so when conditions change the direction of selection changes too, as with dark and light peppered moths and the sickle cell allele where malaria is common.
From AP Biology.