Cooking involves a few different thermodynamic "steps":
1. Sensible heat change (change in temperature),
2. Reaction (could be exothermic, those most are probably endothermic),
3. Phase change (always endothermic during heating), and/or
4. Other (such as pasta, which I believe is not a truly reactive system but involves water infiltration that inducs swelling).
The reason you have to "cook" things by heating them is to
1. Increase the rate of an exothermic reaction (which, like I said above, are likely very few, since these would occur spontaneously given sufficient time at room temperature),
2. Supply the energy necessary to sustain endothermic reaction,
3. Supply the energy necessary to induce phase change, and/or
4. Increase various transport properties, such as the diffusivity of water in pasta.
I designed an automatic pasta machine for a class project a few years back. Still looking for startup funds if anyone is interested in making a few mill.
edit:
To more directly address the OP, I suppose the second list could be changed to include
5. Change the selectivity of the endothermic reaction.
Toasting is essentially the controlled release of non-carbon atoms from the bread, which is likely an endothermic decomposition reaction. Burning toast is essentially taking the reaction to completion, so controlling the time and/or temperature in the toaster controls the extent of reaction.