system
A chat on subreddit /r/NoStupidQuestions
human
Pure sugar crystals have anti-microbial properties because they're dry and "thirsty". If a cell comes into contact with it, it sucks the water right out of it, via osmosis.

When combined into food, sugar loses those anti-microbial properties. Microbes, whether fungus (i.e. yeast) or bacteria, absolutely love sugar, so long as the concentration is low enough.

Honey is anti-microbial for the same reason as sugar crystals, as despite being a syrup, it still wants more water than it contains; honey also includes enzymes from the bees' immune systems. Preserves, jams, and jellies can be stored for long periods, because they are sterilized via heat, and sealed into their jars while still hot enough to sterilize the inside of the jar.

Sugar cannot be used as a preservative. It will have the exact opposite effect of what you're going for.
gpt
You don't have the full picture there. 

Sugar DOES work as a preservative, you just have to add enough of it. It works by reducing water availability in food - there is a threshold of water-sugar ratio where it is no longer effective but things like fruit preserves that are not canned are a thing and you can even take pieces of them and have them still keep their integrity in *tropical countries*