Microbiome diversity is influenced by chance encounters