Most "bad" bacteria are gram negative. Most "good" bacteria i.e. probiotic micoflora, are gram positive. It should be noted that the gram negative bacteria have a cell wall composed mostly of lipopolysaccahrides.
Antibacterial agents all affect the cell walls of gram positive and gram negative bacteria differently.
Garlic kills "bad" bacteria and leaves the "good" bacteria alone. Is it magic? Is garlic alive and conscious and put here to help humanity? I believe so. Regardless, it is based on physiological principles.
By the way, Gibby, I highly recommend you stop seeking the advice of medical doctors and educate your own self. Become your own physician and you will know certain truths about health, healing, the human body and the world around you intrinsically and through personal experience rather than hearsay.
For example for some reason you thought raw garlic kills good bacteria because you may have heard or read it somewhere. But if you followed your own experiences you would know directly the truth that garlic does not affect beneficial microfora. This is just one example. Another great example is knowing that the Liver Flush stones released from Liver Flushing are indeed from the liver and gallbladder and not by products of the flush mixture.
The truth is available for everyone, right here, right now. Just be brave enough to change your ways of thinking and relating to yourself and the world around you, and the truth will emerge naturally.