Microbes - healthy bacteria

bacteria

It seems generally accepted that bacteria in our gut, part of our microbiome, is a good thing, but why? Has there been any research in to the reasons why?