This is a natural phenomenon also known as Contagious Yawning. Certain psychologists and biologists have studied this and they believe there are some specific factors that could be responsible for this and they're clearly not tiredness, sleepiness or empathy. It's not even infection as even reading the word "Yawn" will make you yawn often, It is common amongst almost half of the young generation, except children below 10 years of age.
According to a survey, contagious yawning has been observed more in humans and chimpanzees than any other being. Even whilst reading this answer, you might have yawned a few times. Age is the most important factor/predictor in this as the only specific age group is affected by this the most. On the other hand, spontaneous yawning is different and occurs due to boredom, tiredness or if you need some sleep.
The conclusion is that more deep research and study is needed to find a more acceptable answer to this Unsolved mystery.