When canning was invented, no one knew why food that was packed and heated inside containers remained fresh for a long time.
Then, in 1860, French scientist Louis Pasteur discovered that food spoilage was due to bacteria present in all fresh food and in the air. These organisms breaks down substances in the food and make them useless or harmful to man.
Then it was understood how canning works: The heating kills bacteria in the food, and the sealing of the can prevents more bacteria from getting into the food. Food inside a can should stay fresh for as long as there is no opening in the can.
In the 1920s, American companies found that packing food in liquid kept it fresher and more nutritious. That’s why most canned foods are packed in water. And all cans today are vacuum-packed, which means that the air is sucked out of the can before it is sealed.
This prevents bacteria in the air from infecting the food.