Our body needs some kinds of bacteria to maintain a balanced and healthy state. for example, our bodies need Lactobacillus acidophilus to create lactic acid which is the acid in our stomachs/intestines. without it, we wouldnt be able to properly digest our food.
there are some cases in which bacteria can be really harmful however like salmonella which, odviously isnt ideal for our bodies. even good bacteria can hurt us if we end up with to much of it.
this isnt a super detailed explaination but i hope it helped!