They came up with fermentation because they needed a way to keep foods from spoiling. Same with salting, smoking, or dying out.
The interesting part to me is the first person who tried the fermented food or the animal meat that fell into the ocean and brined.