Host immunity can exert selective pressure on pathogens. For instance, individuals who have been previously exposed to a pathogen or vaccinated against it may have immune responses that reduce the survival of specific strains. This can lead to the emergence of variants that can either escape immunity or exploit other niches within the host population.