Vomiting is a deliberate response by the body that evolved as a purging mechanism to remove toxins or foreign bodies from the stomach and esophagus. Since stomach contents are highly acidic, vomiting can be quite harmful to the throat, mouth, and teeth, and salivating helps to reduce this by diluting and rinsing. Saliva is also weakly alkaline, which helps to neutralize the acid.