Short answer: No. According to a recent study, infectious yawning has also been observed in dogs and chimpanzees. So, what makes it contagious?
There is no consensus on this issue, as the actual purpose of yawning is still unknown. It is still not known for certain what is achieved with yawning, while it is seen in situations such as fatigue or boredom. But according to one study, the effect of yawning is equivalent to a dose of caffeine.
But why is there contagion? One theory about this is that this contagion refers to a social bond. There is also research to support this. According to these studies, people are more affected by the yawning of acquaintances than strangers; and in infants, infectious yawning occurs around the age of 4 – that is, at the age when social characteristics develop. It has been theorized that the purpose of contagion is to awaken and warn the social group against a danger.
Back to dogs and chimpanzees. Yawning transmission from acquaintances has also been seen in chimpanzees, and an interesting event in dogs has been yawning transmission from humans. In the study, 21 of 29 dogs exposed to human yawning yawned.