The type of bacterial flora in any local microenvironment depends either on local conditions (nutrients availability, pH, pO2, temperature, host immune system) either on metabolic features of colonizing bacterial strains, that in turn affect the host behavior.
The Bacterial Flora of Humans