Maillard Reaction
It's complicated, but basically it makes food taste good!
The roasting of coffee beans is a prime example of the Maillard reaction in action
The Maillard reaction is a complex series of reactions responsible for browning in high-heat cooking. The general reaction is when a reducing sugar (sugars which contain a free carbonyl, or double-bonded oxygen, group) reacts with a free amino (NH3) group on a protein. Because there are many sugars which qualify as reduycing sugars, such as glucose and fructose, and innumerable proteins which can react, the Maillard reaction results in thousands of compounds.
This reaction is considered nonenzymatic browning since there is no enzyme catalyzing the reaction. The reaction is favoerd by high sugar content, high protein concentration, high temperatures, high pH, and low water content.