You may not think of chemistry when you're baking a cake, but it is definitely a chemically based process. Whatever type of food you bake, the recipe's basic ingredients are involved in several chemical reactions that tie diverse ingredients together to form the finished dish.
TL;DR (Too Long; Didn't Read)
The process of cooking is a series of chemical reactions that turn separate ingredients into a cohesive, edible dish. Baking might not seem like it involves chemistry, but the ingredients you use undergo chemical changes to form the final baked good.
Most baking is based on the use of flour, the powder form of grains, nuts and beans. Wheat flour, the most commonly used type of flour in baking, is composed largely of starch and protein, with very high levels of a class of protein known collectively as gluten. When water is added to wheat flour, the gluten forms a heavy, pliable mass. This expands greatly under hot temperatures and sets with the desired airy texture.
Leavening agents such as baking soda, baking powder and yeast give baked dough its lightness. Baking soda reacts with acids in the dough to make carbon dioxide, which helps the dough to rise. Baking powder, which is baking soda with an additional acidic salt, releases carbon dioxide twice during the baking process, once when it hits water, and again when it reaches a certain temperature in the oven. Heat helps baking powder produce tiny bubbles of carbon dioxide, which make a cake light and fluffy. When yeast, a single-celled fungus that feeds on starch and sugars, is added to dough, it also releases carbon dioxide bubbles, giving the dough a light, delicate texture.
Sugar does much more than just sweeten a cake. When the baking temperature reaches 300 degrees Fahrenheit, sugar undergoes what is known as a Maillard reaction, a chemical reaction between amino acids, proteins and reducing sugars. The result is browning, which forms the crust of many baked goods, such as bread. The Maillard reaction is not the same as caramelization, but both work together to create appetizing golden-brown surfaces and an array of flavors. Sugar also provides a direct food source for yeast, enhancing the yeast's activity.
Emulsification and Binding
Eggs in a cake mixture may fulfill one or more of three functions. Beaten egg white is used, like baking powder, to give the dough a light, fluffy consistency. This is possible because egg white (albumen) contains lecithin, a protein that coats the air bubbles created during beating, which stops the cake from sinking during baking. ILecithin also acts as a binder to hold the cake together. When egg is used as a glaze, it also acts as a source of protein for the sugar's Maillard reaction.