Why test for heavy metals, pesticides and microbial contamination in wines?

A 2015 University of Washington study showed that arsenic levels in 64 out of 65 wines tested exceeded EPA limits for drinking water. Long-term arsenic exposure can lead to various cancers and skin lesions, developmental effects, cardiovascular disease, neurotoxicity and diabetes. In a recently completed in-house pilot study, we found four of 22 wines assayed tested above EPA limits for arsenic. However, the majority of the wines tested had arsenic levels ranging from 5 ppb to 9.9 ppb, which is just below the 10 ppb EPA limit. 

Where do the heavy metals come from?

That's unknown. The possible sources include the soil of the vineyards in which the wine grapes are grown, the fungicides sprayed on the grapes, and possible contaminants in the yeasts used to ferment the wine.

Bacterial contamination of wines leads to unpleasant flavors and aromas, reducing quality and value. Aflatoxin B1 and ochratoxin A, and the fungi that produce them, can be found in grapes and grains used to produce beers and wines.