"When fat and sugar are mixed together - the process is called creaming - little bubbles of air are being trapped in the mixture, each one surrounded by a film of fat (which is why the mixture changes colour during creaming as the trapped air creates a foam). It is this air which creates the lightness in the finished cake, but unless beaten egg is added to the mixture the fat would collapse and the air escape during cooking. The egg white conveniently forms a layer around each air bubble, and as the temperature of the cake rises in the heat if the oven, this layer coagulates and forms a rigid wall round each bubble, preventing it from bursting and ruining the texture of the cake. During the baking the bubbles of air will expand and the cake will 'rise'. At the same time the stretchy gluten in the flour - which has formed an elastic network around the air bubbles - will stretch until, at a higher temperature, it loses elasticity and the shape of the cake becomes fixed. But until that moment is reached the expansion process must be allowed to continue uninterrupted. Which is why a) the cake should be baked as soon as it is mixed and b), even more importantly, the oven door should never be opened in the early stages of cooking. (Delia Smith, What Happens When You Bake A Cake? From: How To Cook )