Pickled food is not the same as fermented food
Pickling food involves placing vegetables in vinegar. The food is preserved because vinegar is very acidic and bad bacteria cannot grow (refer safety precautions). Sugar is then generally also added to the vinegar to make the food sweet and sour.
The food is never fermented/eaten by bacteria – the food is simply preserved in vinegar which is very acidic and kills nearly all the good bacteria and all the bad bacteria.
Any bacteria that do survive the acid are killed off later because the food is heat treated to a high temperature killing all the microorganisms.
Fermented Food
Fermented food is made differently – often by placing vegetables in a salt brine and encouraging the growth of good bacteria. However there are several different ways to ferment food including bacteria, yeast and molds.
But what they have in common is they are a relatively slow process taking hours, days or weeks and involve harnessing good/useful microorganisms to partially digest the food which has many health benefits.
Traditional Vinegars
Interestingly traditionally made vinegar in its raw form is actually a living food which contains the beneficial bacteria you need to digest your food properly. Because traditionally vinegars are made using fermentation but the vinegars you buy in the supermarket (except for raw cider vinegar) are pasteurized and contain no good bacteria.