Whipped cream in a can was discovered completely by accident. A university student named Goetz was working with a professor on preserving milk with the goal of eliminating bacterial contaminants.
Goetz trying to use carbon dioxide under pressure with whipped cream as a preservative but his experiments were not going well. Every time he went to test the cream it would spray out in a “whipped” state. Goetz was so frustrated he went and got his professor for help.
The professor saw the potential and the rest is history (more or less).