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.
Pictured is the Hotel Dieu, the oldest hotel in Paris. It opened in 651 AD and is nearly fourteen-hundred years old: