It's a bit like laughing. Synchronise the mood of the group. I assume other mammals have contagious yawns too?
I think you're onto something here. Does anyone know if there are examples of very non-social species yawning (i.e., something that has a brief mating period with no prolonged pair bonding, and then it lays eggs and takes off)?
Cats certainly do.
Strangely, dogs sneeze to show deference.