Sugar ususally isn’t kept in a fridge, and keeps well. Sugar is even used as a preservative. But isn’t it good nutrition for microorganisms? After all, fermentation is conversion of sugar into alcohol by microorganisms. So why does suger keep so well?
Sugar is a preservative. Too high a concentration kills bacteria (it’s also too dry for them to grow on it). The dryness also prevents mold. Since rotting usually involves molds and bacteria, that pretty much why it doesn’t rot.
In a jelly, it still is a high enough concentration to kill any bacteria, even though it’s moist. Mold can eventually grow on it.
“What we have here is failure to communicate.” – Strother Martin, anticipating the Internet.
Yes, if there’s too much water or too little sugar bacteria will grow. The only hint I could find of why this is so implied that the sugar draws moisture out of microbes, killing them. I assume that this is similar to the way salt acts as a preservative. Osmosis.