The drugs used for anesthesia are so powerful that they slow or stop your respiratory drive. When you are under general anesthesia a breathing tube is inserted through your mouth and into your airway, (trachea), to help you breathe. The trachea and the esophagus open at nearly the same place in the back of the throat. Under normal conditions a small flap of tissue covers the trachea when we swallow preventing the inhalation of food into the lungs. When you are under general anesthesia this defense mechanism is compromised and contents from the stomach can come up through the esophagus and be inhaled into the lungs. You're also at increased risk of vomiting. These two things can lead to a very dangerous condition called aspiration pneumonia.
The best way to prevent this is to make certain that there is nothing in your stomach that could be inhaled into the lungs. Even small amounts of liquids are dangerous. Smoking, chewing gum, sucking on a mint, or brushing your teeth can cause your stomach to create digestion fluids which can also be inhaled into the lungs. Therefore, it is very important that you follow your doctor or nurses instructions about not eating prior to surgery.