The sugar in pickles is part of the recipe. Vinegar is part of the means of preservation, sugar or salt are another part. All 3 reduce a physical measure termed "water activity" (Aw) which is a measure of the water available in a food for living things. Water has an Aw of 1.0, things like milk 0.95, meaning anything can and will grow in it, down through things like cakes at 0.8, where most things won't grow but yeasts and moulds will, some jams at 0.7 supporting the growth of very few things, only xerophilic (sugar loving) moulds and maybe the odd weirdo yeast. Below 0.6, forget it. You can actually model the probable spoilage and bacterial growth in any food if you know the pH, Aw, salt content, sugar content, presence of preservative compounds, etc. Reducing sugar, salt, and the presence of things like spirit vinegar is all very well, but some foods won't work without them.
Oh, and mustard is an essential part of the piccalilli flavour. Turmeric is generally the colour, as other s have said.