When they tell you to not eat, it is to prevent you from vomiting from the anesthesia. It sounds like they take steps to prevent you from vomiting and aspirating anything from your stomach into your lungs, no matter what: They use a special technique to close-off your esophagus while they are intubating you, and the tube itself completely seals off the [valve] around it.
What do surgeons do for emergency trauma patients that have eaten right before the trauma? Can they be put under anesthesia?
Pictured is the Hotel Dieu, the oldest hotel in Paris. It opened in 651 AD and is nearly fourteen-hundred years old: