Eli5 version: heating/cooking food makes it “healthier” by killing most of the germs and parasites that can be in and on it – this benefit was huge before we had industries and safety protocols to minimize risk, or medicine to cure these ailments after.
Cooking also makes food healthier by allowing us to get more nutrition out of it; that was a huge boon to our species when we could derive more nutrition from the food we already had. Heat breaks food down and makes more nutrition accessible for us.
In terms of flavor. Well, we often cook with that in mind and add a bunch of things like salt and fat. So even before you get to any chemistry changes that make food taste good we’re adding in more stuff that makes it taste good as a basic part of the process.
Latest Answers