When a patient has something as invasive as surgery, one's system can easily become upset. If someone has food in the stomach, the resulting nausea, etc. can cause the patient to aspirate this food, and be in danger.
The tube that is inserted into the patient's throat to provide aethestia and oxygen while asleep may cause the patient's gag reflex to react when it is removed. This regurgitation can cause damage to a patient's lungs, damage that is painful and serious as the aspirating of fluids and solids can cause pneumonia as well burning of the lungs from caustic stomach acid.
Of course, if the surgery involves the gastrointestinal system, having food in the stomach can certainly complicate the operation, leading to infection or cancellation of the surgery.
The main reason an empty stomach is desirable is to prevent nausea and vomiting. If the surgery is done under general anesthesia, this means that the patient is intubated for the procedure. Intubation means that an endotracheal tube(ETT) is passed down the trachea and connected to a ventilator during the procedure. In essence the ventilator breathes for the patient temporarily during the operation. This is necessary because the induction of anesthetics diminishes the patients ability to breathe on their own. General anesthesia depresses the central nervous system, which helps your body to breathe. An empty stomach decreases the likelihood of vomiting. When an ETT is in place, if you vomit, you will aspirate (food or fluid will go down the trachea). Aspiration of stomach contents can be fatal.
Postoperatively, people have pain and are receiving narcotic analgesics. A very common response to this pain and the pain medication, is nausea and vomiting. Again, the goal is to try and prevent the nausea and vomiting.
Many different types of anesthesia are used during surgical procedures. Most of the time it is unknown what kind of reaction the person will have to anesthesia. One of these reactions could be nausea and vomiting. It can be very dangerous if a person is lying on their backs during a surgical procedure and uncontrollable vomiting occurs. Many people often experience nausea and vomiting when waking up from a surgical procedure as well. It is very important that people rest after a surgical procedure. They may be compelled to get up, which is a fall risk. In addition, they may rupture any incisions they may have had due the vomiting.
There are many reasons, but if the surgery is being performed on one of the organs in the digestive track it is best to have an empty stomach because if something goes wrong during the surgery the contents of the digestive track can spill and end up causing an infection in the body which might turn deadly, as we have something in a place it is not supposed to be. Also if the patient has to have a tube to aid breathing during the surgery when it is pulled out they can throw up the contents of their stomachs.
Anesthesia given during the operation as well as the operation it self may induce vomiting in the patient being operated. When this happens to a patient who is unconscious and being operated it definitely interferes with the operation procedure. More than that it can cause chocking of the wind pipe by the food vomited, and food entering the lungs. A the normal body functions that prevent the vomited food so affecting the patient do not work because the patient is unconscious. The problem is further aggravated by the fact that operations are almost always performed with the patient in lying down position. To avoid all such complications, a patient is kept on empty stomach while having any surgery.