It’s not really known why but laughter being contagious is thought to be some sort of laugh detector in humans. Possibly a neural circuit in the brain that responds exclusively to laughter and generates a response of laughter, similar to contagious yawning. It’s brain chemistry. As to what purpose this served evolutionarily, maybe it’s a bonding thing that helped humans to relate to one another and come together as a social species.
Latest Answers