During the Napoleonic wars, the French government needed a way to preserve food for soldiers long-term. This led to the invention of canned food, although back then it was in sealed glass jars.