In theory-It is the high osmolarity of the sugar, not tying to create anaerobic conditions which would be bactericidal (many bacteria love low to no oxygen conditions). The hypertonic nature of the pure sugar would basic dehydrate the bacteria. The bacterial wall acts as a semi-permeable membrane, the water contained with the bacteria will then pass through the membrane in an attempt to dilute the sugar. Bacteria that can form spores are resistant to this effect.

Pete