While they can be (at times) embarrassing, and spread like wildfire, a yawn is instinctual and carries practical applications which we are still beginning to learn about. Researchers have found that yawning is not just due to a lack of sleep or oxygen. The reasoning is far more complex, with different causes and functions—one of which is to keep the brain active and cooled. Even yawning contagion may have evolved over time as a way to keep groups of people or animals alert and aware.
The Science Behind Yawning