It takes good grapes to make good wine. But protecting a vineyard against the invasion of fungi and insects is not always an easy affair. So, close to harvest, you will always find a few rotten berries in a vineyard. Knowing that grapes in bad shape can innoculate harmfull microorganisms and provoke dubious flavors in a wine, you should better remove them before starting. Therefore, sorting out bad grapes is an excellent way to achieve proper crop quality in the cellar.
If picking is done by hand, sorting may already start in the vineyard: Rotten berries or parts of the grapes are being cut out and the grapes can even be re-sorted again in the boxes or on the trailer. In the winery sorting tables or automatic optical sorting systems may bring the work to perfection, giving the ideal starting point for wine production without problems (and probably even without sulfur).
Today, modern machines are automatically equipped with a fairly efficient sorting system, removing any leaves, leaf stems and other plant parts that may have fallen off the vines with the berries. And nothing (except time and money) may withhold you from resorting the harvest again at the winery using classic handsorting or optical sorting to get a perfect crop.
The sorting of the harvest is therefore an almost unavoidable step for flawless, high-quality wine production and may even save harvest quality (but not quantity), especially in case of difficult vintages.