Specialized host–microbe symbioses canonically show greater diversity than expected from simple models, both at the population level and within individual hosts. To understand how this heterogeneity arises, we utilize the squash bug, Anasa tristis, and its bacterial symbionts in the genus Caballeronia. We modulate symbiont bottleneck size and inoculum composition during colonization to demonstrate the significance of ecological drift, the noisy fluctuations in community composition due to demographic stochasticity. Consistent with predictions from the neutral theory of biodiversity, we found that ecological drift alone can account for heterogeneity in symbiont community composition between hosts, even when 2 strains are nearly genetically identical. When acting on competing strains, ecological drift can maintain symbiont genetic diversity among different hosts by stochastically determining the dominant strain within each host. Finally, ecological drift mediates heterogeneity in isogenic symbiont populations even within a single host, along a consistent gradient running the anterior-posterior axis of the symbiotic organ. Our results demonstrate that symbiont population structure across scales does not necessarily require host-mediated selection, as it can emerge as a result of ecological drift acting on both isogenic and unrelated competitors. Our findings illuminate the processes that might affect symbiont transmission, coinfection, and population structure in nature, which can drive the evolution of host–microbe symbioses and microbe–microbe interactions within host-associated microbiomes.