Why is it necessary to have an empty stomach before any surgery?
You need to have an empty stomach before any surgery because the anesthetic increases the chances of regurgitating, which can damage your lungs and cause breathing problems.
This is because, during the operation, you will be given either a local or a general anesthetic. When a general anesthetic is given, all the normal reflexes of your body tend to relax. This increases the risk of vomiting, which causes regurgitation of contents of the stomach back into the esophagus and mouth or even into the windpipe and lungs. If your stomach contains food, it can get into your lungs and cause breathing problems and damage to your lungs. Therefore, it very important to have an empty stomach before undergoing any surgical procedure that requires the administration of general anesthesia.
Source: https://www.cedars-sinai.edu/