There's also the social aspect of yawning - seeing someone yawn triggers a yawn... Maybe brains like to maintain a similar temperature to nearby brains.
It might also be a type of communication which goes against the typical 'pack' animal communication hierarchy. It might make sense for the pack to sleep when any of the pack is tired, rather than waiting for the alpha-dog to feel tired. 'contagious' yawning allows that.