How does chemistry relate to cooking?
It sure does relate to cooking.
Every ingredient we use is chemistry! For example: water, sugar, oil, salt, pepper, ... In every vegetable and meat there is chemistry: proteins, again sugar and many natural organic compounds.
Also, cooking is not just chemistry. It is also physics: heat, energy, ...
Here is a great video "The chemistry of cookies":
Simple but sufficient to explain the flavor of the subject on this page http://www.science.ie/features/archived-feature-articles/chemistry-of-cooking.html