What is the function of the bacterium, E. coli, in the human gut?
I have tried to find the answer by searching the Internet (e.g. here), but have been unsuccesful.
Nonpathogenic E. coli strains are a component of the gut microbiome of humans and many other organisms.
They are commensals, meaning that when they remain in the areas they have evolved to live in, and when they do not acquire virulence factors, they are benign. They live in our digestive tract and basically do nothing to harm us.
In fact, commensal microorganisms like E. coli can be considered part of the innate immune systems of their multicellular hosts. They take up space on the surfaces of the intestines and prevent colonization by pathogens.
Along with the endothelial cells and mucous, commensals form the barrier defenses that are the first line of protection against pathogenic organisms. Basically they are the good neighbors that don't cause problems and they don't leave space for bad neighbors to move in.
Problems can occur if they gain access to areas that are normally sterile. If the intestine is perforated and E. coli gain access to the thoracic cavity, they can become an opportunistic pathogen, as they will not be interacting with the host in a way that can control their proliferation. They can also come in contact with cells that are not expressing the necessary proteins to protect them from E. coli.
You can also end up with the situation where a pathogenic bacteria or a bacteriophage carrying a virulence factor can transfer that virulence factor to the commensal E. coli, turning them pathogenic.
But, for the most part, E. coli are there to take up space that could otherwise be colonized by harmful bacteria.
Some relevant research has been published in the time since this question was asked and initially answered.
The label "commensal E. coli" encompasses a diverse group of strains. Different strains of E. coli, each isolated from the microbiota of healthy mice, have been shown to elicit different immunopathological responses after gnotobiotic colonization.1 Generally, strain-level differences in pathogenic potential are attributed to the carriage and expression of virulence factors 2,3, many of which are mobilizable.4,5 However, I find classifications that rely on the presence/absence of genes to be oversimplified and anthropocentric, and I favor a presentation of E. coli as a genetically and metabolically versatile organism whose activity in the gut is a function of the evolutionary balancing of inter-species interactions with fitness in the intestinal niche.6,7,8
E. coli do not serve a human function but live inside our digestive system because our bodies can't prevent bacteria like them from living there. They live there because they can prosper and reproduce there. Most strains of E. coli do not cause problems for us, and by being part of the normal bacterial population in our gut they out-compete other, potentially more harmful bacteria and keep them suppressed. E. coli mainly live in the large intestine, not the stomach.