This relates to Mendelian genetics and the concept of dominant and recessive alleles in a diploid gene. Under this understanding, you could say for example that the allele for light coloured moths is L whereas that for dark coloured moths is l. If l is recessive to L, then moths of the genotype LL and Ll would remain lightly coloured, whereas moths with the genotype ll would be dark coloured. Even if the environment selected out dark coloured moths, these would only be the moths with the genotype ll, and those remaining, LL and Ll, could still cross to produce LL, Ll and ll genotypes. This is how dark coloured moths can remain in the population even though they are actively selected against.