Host organisms can harbor microbial symbionts that defend them from pathogen infection in addition to the resistance encoded by the host genome. Here, we investigated how variation in defenses, generated from host genetic background and symbiont presence, affects the emergence of pathogen genetic diversity across evolutionary time. We passaged the opportunistic pathogen Pseudomonas aeruginosa through populations of the nematode Caenorhabditis elegans varying in genetic-based defenses and prevalence of a protective symbiont. After 14 passages, we assessed the amount of genetic variation accumulated in evolved pathogen lineages. We found that diversity begets diversity. An overall greater level of pathogen whole-genome and per-gene genetic diversity was measured in pathogens evolved in mixed host populations compared with those evolved in host populations composed of one type of defense. Our findings directly demonstrate that symbiont-generated heterogeneity in host defense can be a significant contributor to pathogen genetic variation.