Why is it that when a person vomits, it causes others to vomit — even when they don't have an illness causing it? Is this something triggered by the brain or is it something that happens by reflex (survival instinct) for someone to vomit since, perhaps, what the first person was eating may affect the second who vomits as well?
It was made famous by the Barf-o-Rama scene in the 80s movie, Stand by Me. It's called sympathy vomiting and it can be funny on film, but not-so-pleasant in real life. Here's some information on the "how" and "why" of this inconvenient (yet common) reaction.
The short explanation is this: someone else vomiting can cause you to vomit because it's gross.
How does this happen? In fMRI scans of the brain, scientists have noticed a funny occurrence. With certain behaviors, the same parts of the brain are active when you are doing the activity as are active when you are only watching someone do the activity. If you were getting a brain scan while watching someone eat an ice cream cone, it would appear as though you yourself were eating it.
Why would this be? What's the function of such a mechanism? Your guess is likely on point: Scientists believe that this response is the seat of empathy. Humans have been social animals for a long time in our evolutionary history, with survival-rooted interdependence — living and working together in groups. In the case of throwing up, it may have been true that people who were easily affected by another's sickness were more likely to survive, as you guessed, because such a response would result in an individual releasing a harmful substance more quickly. Of course, these days it may be less adaptive if you are trying to take care of a loved one or friend who is sick. Or drunk.
Different people have varying levels of sensitivity to the sight, smell, and sounds (among other things) of throwing up. The best "cure" for this? Notice what triggers you most severely and try to limit your exposure. For some, it's the smell that's the trigger. For others, the sight of someone losing their lunch is what does it. Still for others, reading this response could be causing their gorge to rise. The clearer you are on your sensitivity, the more you'll be able to work around it, in the unfortunate event that you again find yourself near the nauseous.
Best of luck,Alice!