system
Given the following post, respond as if you're commenting on Reddit:
human
What is a yawn and why is it "contagious"?

I've noticed whenever I see someone yawn most likely someone near will yawn too... What is it anyways?
gpt
No one’s really sure why yawning is contagious. One theory is based on the assumption that yawning is a form of nonverbal communication. In baboons, extensive yawning among members of a group signals the time to sleep, typically with the leader (the “alpha male”) ending the ritual with a giant yawn. If our ancestors used yawning to communicate like baboons do, then the contagiousness of yawning may be an involuntary, genetically programmed phenomenon; once one person in the “tribe” yawns, others do so because this behavior pattern helped our evolutionary ancestors to communicate with one another.

Even more basic than the question of why yawning is contagious is the question of why anyone yawns in the first place. And we all do it about 10 times per hour, more often in the early morning and late evening. In fact, yawning starts before birth—a fetus in the womb yawns beginning as early as 11 weeks of development.

As common as it is, little is known for sure about yawning. Yawning probably doesn’t always indicate a need for sleep, and it doesn’t seem to have anything to do with the body having too little oxygen or too much carbon dioxide (which theoretically could be fixed by taking a big, deep yawn). This latter theory lost favor after a study in 1987 showed that volunteers subjected to high oxygen levels did not yawn less, and those exposed to high carbon dioxide did not yawn more.

EDIT: 

Here are some more theories:

Yawning stretches out the lungs and nearby tissues, preventing tiny airways in the lungs from collapsing. This could explain why we seem to yawn at times when our breathing is shallow (when we’re tired, bored or just arising from bed).

Yawning distributes a chemical called surfactant, a gooey liquid that coats the tiny air pockets in the lungs and helps to keep them open. Surfactant is critical to the ability of a newborn to survive outside the womb. This theory could explain why fetuses yawn during development as they prepare to use their lungs.

Yawning stretches the muscles and joints, and increases the heart rate. For this reason, it may prepare the body for an increased level of alertness, especially after relaxation. This could explain why athletes and professional musicians often find themselves yawning just before periods of increased focus or activity.

Yawning may be a sign of disease. Although rarely the first sign, excessive yawning has been seen in people with multiple sclerosis; amyotrophic lateral sclerosis (ALS, also called Lou Gehrig’s disease); following radiation injury (such as during radiation therapy); and among people treated for Parkinson's disease. Rarely, yawning a lot may signal the beginning of a migraine headache. On the other hand, yawning seems to occur less frequently among people with schizophrenia. It’s not clear why these diseases would impact the frequency of a person’s yawns.