After a hard work out, it's generally a good idea to not stop immediately, but rather to cool down. What is the specific purpose of cooling down? Does not properly cooling down affect the actual efficiency of the work out itself?
According to Physiology of Sports and Exercise:
Also you should remember that intensive exercising effects your entire body: your heart is pumping, your lungs are ventilating, your blood is racing through your body, your muscles are contracting, your liver is producing energy. If you were to suddenly stop, your body will slightly lag behind your abrupt change in exercise intensity (or the lack thereof).
When you've been working out near the lactate threshold, your body has also been piling some amount of lactate. If you lower the intensity of your workout, such that you get enough oxygen, your muscles will start using lactate as a fuel and get rid of it. Because burning lactate creates a lot of waste products like CO2 and creatine kinase, it's advisable to keep up some level of activity, so that your body can get rid of it easily.
During workouts, your body releases hormones such as adrenaline and endorphins, if you were to abruptly stop exercising, you maintain higher levels of these hormones which can cause a feeling of restlessness or a sleepless night.
Another good reason is that when you exercise, your muscles stretch and shorten a lot. If you were to stop abruptly, you leave your muscles in a somewhat misaligned state. By cooling down, you gradually limit the range of motion back to the state it would be in when you're in rest.
So basically, the goal of cooling down is giving your body time to readjust itself to the change in requirements.
However, a study by Law and Herbert from the university of Sydney indicated that cooling down did not reduce delayed-onset muscle soreness. Which might indicate that this isn't directly related to residual waste products. Furthermore, Tanaka, an exercise physiologist from the University of Texas claims it's an understudied topic and that there's no science behind the advice.
I'd like to point out that my while my answer is based on the physiological processes going on during exercise, I don't have any publications to back them up. Lucky for me, neither has he.
The two scientific reasons to cool down are to allow your heart rate to return to a normal, resting rate gradually instead of suddenly, and to provide lactic acid relief.
The first is probably the most important. A sudden cessation of activity can create a lot of rapid changes in the body that place undo strain on the heart. The muscles are engorged with blood and suddenly stop working and this must all be flushed.
You can look at studies like this one: http://www.ncbi.nlm.nih.gov/pubmed/12735426
That suggest various markers for stress are far reduced in people who cool down compared to those who don't.
This study shows more benefits, this time to the respiratory system, of cooling down: http://www.ncbi.nlm.nih.gov/pubmed/10732850
Definitely an important part of the workout.
The purpose is simply to recover faster.
Pete talks about this in this podcast: Pete Pfitzinger on Maximizing Your Recovery