For cranberry sauce and other jams, sugar helps the mixture firm up. If you use less sugar in the recipe, the cranberry sauce will set much more loosely. In addition, sugar acts as a preservative, which helps maintain the color of the cranberries and prevent mold growth.