Hi!
E. Coli bacteria do not harm us if it is only where it should be, i.e. in the intestines. If the intestinal walls are overrun by fungi or other pathogens that damage the intestinal walls, then this bacteria and other bacteria can enter the bloodstream and then harm us. Sitting in the intestines, they do a beneficial job for our body, and they are said to also produce H2O2, which is ammunition for white blood cells.