I wasn’t sure if this was a CS or a GQ… please move it if I got it wrong.
A raw egg tastes different from a hard boiled egg. Why? What is it about being cooked that makes it different? I mean… it’s the same stuff…nothing is there that wasn’t there before…
Chemical reactions from the heat. In addition to the sugars caramelizing, proteins undergo processes as well, such as denaturing and the Milliard reaction. Other compounds also undergo changes, but AFAIK the proteins and sugars are the big ones.
Have you ever wondered why you can freeze water but you can’t un-bake a cake? Adding heat to the ingredients causes chemical reactions that transform the food into completely different substances than were there before.
There are other processes to consider as well–cooking vegetable matter tends to break down cell walls, releasing chemicals that give the veggies a different flavor from their raw state.
Which is why garlic gets more “garlicy” the more you chop it up. Certain chemicals are in different locations in the clove, and by breaking cell walls, they get together and make new chemicals, some of which make the garlic “hot,” some make that smell, and so forth. So eating a whole clove is less intense than eating a clove that was all chopped up, assuming you get all the juice it was chopped with. In that same vein, high heat breaks down those same chemicals, so roasted garlic is less intense and sweeter.
And the cell walls breaking is also why veggies become as limp as a wet noodle when you cook them long enough.