Infection is a relative term. Grain (so beer) is very susceptible to lactobacterial infection and lactic bacteria will compete with the yeast for the sugars in the grain and will produce lactic acids which will make your beer sour. There are also other bacteria and molds that love grain and are in the air and because your beer is at a relatively high pH (around 5.2) your wort and beer are party houses. Honey is not as inviting and it is not entirely obvious (to me, at least) that this fermentation is about mead making as much as it may be about the use of lacto-bacteria to ferment the honey. I am thinking that what the garlic bring to the table are these bacteria and so you are creating a lactic fermentation - in much the same way you might pickle cucumbers or cabbage by adding enough brine to prevent any mold or spoilage bacteria from thriving but which encourages lactic bacteria on the vegetables to multiply. I am thinking that the bacteria on the garlic multiply in the presence of honey at a concentration that inhibits or restricts other mold and other unpleasant bacteria that would otherwise "spoil" the honey in ways you and I would not like. The lacto-spoilage we do like almost as much as we love the way that yeast infect and spoil fruit.
Of course, I could be completely mistaken but I suspect this has nothing to do with alcoholic fermentation...