The environment selects for specific genetically determined traits. Different environments select for different traits, and therefore different alleles.