Its a rather odd way of referring to bacteria as being good or bad - its a bit anthropocentric.
Rather, bacteria have thoroughly colonised humans, and have adapted along with humanity to form a relationship that is not just commensal, but beneficial, aiding in all sorts of ways, from aiding the immune system through to aiding in the digestion of foods.
What is termed bad bacteria is often an organism strange to our own system, which can have some unpredictable effects.
So