After ingesting the food, our digesting system moves the food through the esophagus so that the food moves towards our stomach. However, there are some conditions due to which food comes in the backward direction, for example:
Bacterial infection → our body wants to get rid of the bacteria ASAP
Travel sickness → it can cause minor nausea connected to movement
Weak stomach → for some people, mixture of food or spiced foods causes vomiting
In such cases, the food comes out of the stomach towards the esophagus and moves upward through anti-peristaltic movement. The food together with the stomach acid moves upward towards the mouth and comes out. During vomiting, salivation increases to protect the enamel of teeth from the acidity of stomach acids that enter the mouth.