But sugar is literally added to jelly as the preservative, that's why jelly exists to begin with.
For example, the very first recipe for strawberry jelly from some horrible spam recipe site:
2 cups (16 ounces) pure strawberry juice (I used 3 1/2 pounds ripe, fresh strawberries to get this amount of juice) 3 1/3 cups (666 grams) granulated sugar
It's literally more sugar than strawberry juice.
Sure, that’s why sugar is added, but it doesn’t have to be. The point is to remove free water (water that bacteria can use, I don’t know the English expression for that), and you can do that by:
1. adding more sugar
2. cooking it for a longer time
3. adding pectin (either store-bought or from natural sources)
Of course it depends on the kind of fruit, but it’s quite rare to have more sugar than fruit, even without pectin or longer cooking time.