Pickled sugar garlic can't be eaten if it's been left out for years. Pickled foods, including sugar garlic, should not be eaten if they have been left out for too long.
Sugar garlic should go bad after three or four years.
There are many acid-loving, salt-loving and sugar-loving microorganisms in nature. These microorganisms can inhibit the growth of spoilage microorganisms during the pickling process. But over time, the harmful substances produced by these microorganisms can accumulate to a level that can affect your health and even threaten your life.
So, if the food is left for longer than the normal consumption period, it should not be consumed.
Reference:
Baidu Encyclopedia--Sugar Garlic