Well, they certainly excrete. CO2, alcohol, yoghurt, lots of stuff. It goes round and round, eaten by other microbes or plants and back round again.
Put one bacteria on a sterile plate of nutrient-filled agar jelly, and it will grow and divide spreading across the agar until all the food is eaten or all the excretions make it too toxic it for the bacteria to survive. If the bacteria doesn't transform itself into a spore to survive, the plate will become sterile again.
Luckily, our planet isn't so flat.