Why to add garlic for pickles? My mom uses to add 2 or 3 garlic cloves for each pickle jar when pickling something.

She says that by this way she will prevent them from being overpickled, and stay one whole part. 

However I tried pickling more than once without adding these garlic cloves, and they ended just fine.
Is there any hidden purpose from adding garlic to pickles, for the taste probably? Or is it just by chance?

Some websites list in their recipes garlic cloves too.
Garlic in pickling recipes is just for flavor.  It does not effect the chemistry of the pickle--either for vinegar pickling, or fermentation pickling (other than adding more vegetable mass to be pickled).

(This part of my little quest to close old questions with no answers, and no other substantive answer has been offered in the week since the question was asked.)