Too much of a good thing is always bad for you, whether the you in question is a human being (haven’t we all suffered ill effects of over indulgence at some time or another?) or a near-invisible microbe. Both salt and sugar are good things for microbes, second in importance only to water and air as ingredients necessary for living, in fact. And yet, put enough of them in your foods – think briny pickles and sweet jams and jellies if you will – and they act as deterrents for the selfsame bacteria and fungi whose lives that they help sustain.
The reason for this volte-face by sugar and salt is a process known as osmosis, which in turns leads to dehydration. Water, as indicated earlier, is not just good for life it is essential. So anything that triggers dehydration is ultimately a death sentence. The victims in the case of jams and jelly are the microbes, which normally live off the fruits, and vegetables that are being preserved.
Osmosis can be described as the tendency of water to want to distribute all its dissolved contents, such as sugar and salt, evenly throughout the entire space it (i.e. water) occupies. In other words, water moves or diffuses from dilute solutions to more concentrated ones. Inequalities in concentration in any given space occur due to the presence of compartments separated by sieve-like membranes or surfaces that allow some things (such as water) to pass through them, and impede other substances. You may remember trying (or watching) an experimental demonstration of osmosis in grade school using sugar syrup and plain water separated by a membrane (or piece of gauze). The same scenario at a microscopic level is what enables concentrated salt and sugar solutions to prevent microbial spoilage of foods.
Bacteria and fungi, being naturally enclosed in semi-permeable membranes, automatically create an osmosis-inducing environment for themselves in the presence of any liquid. Remember that roughly 90 percent of all living cells are comprised of water with various dissolved substances. So, when the microbes come in contact with very concentrated solutions of salt or sugar, they trigger an osmosis, which causes water to leave the cells in an attempt to dilute the brine (or jam). As the microbial cells lose their water, they also lose their capacity to perform the activities of life and thus die, leaving the pickles, jams and jellies unharmed.