A particular trait of an animal will be considered as advantageous or deleterious depending on the environmental condition. If the trait helps the animal to survive better in a particular condition it will be considered as advantageous and if the reverse is true then it will be deleterious.
Now come to question, rock pocket mice evolved to have dark coloured fur in certain habitats, that means it was something different in colour in the past tome. And the increase in the frequency of this black colour fur means it is an advantageous trait of this mice which help this mice to survive better in a particular habitat from other mice of the same species. So we can say that the trait is increasing the fitness of this mice. For that reason this particular trait which is evolved will be conveyed into the next generation and so on, and the natural selection favours this trait over others because it gives better survival in the environmental and finally it will be inherited into next generation.
As you saw in the film,rock pocket mice evolved to have dark-colored fur in certain habitats....