Usually is a sympathetic response because of “mirror neurons” with which we are empathetic to others emotional and physical states, but more often it is not the sight but instead the smell.
It is believed that responding to something gross like this is a means of self preservation. Because of how awesome nature is, it may recognize that the person next to you is sick, it’s possible they have food poisening and cause they are near you, you might have had the same thing or something near it, so it’s best to get rid of whatever you ate before you get sick too.
Latest Answers