For anything that requires a process for that matter.Bread? How did they do that?
When I was a boy, I read a book about a caveman of sorts. In the story, he kills a snake and notices the fluid coming out of it's fangs. He prods the mouth with his spear and gets some of the venom on the spearhead. Later he uses it and successfully kills an animal with just a grazing wound. This was the explanation offered in the book. Observation, accident, recognition and deduction.
I'm guessing, trial and error over time coupled with observation and imagination played a big part in early human cultures and the development of processed foods or anything that had a process to be worked out.