We always tell folks to take away the pet's food the night before any procedure that will require anesthetic: surgery, dental cleanings or extractions, whatever. If the patient will be unconscious in the hospital, we want an empty stomach. If you take away any food twelve hours before the procedure, that usually gets us an empty stomach by the time we need it.
Why do we need an empty stomach for anesthesia? It's because of two things. The first is that anesthetic drugs, some pain-killing drugs, and just the process of being put under all have the potential to cause some nausea. If you have some nausea and your stomach is empty, you have some nausea. If you have some nausea and your stomach is full of food, you will probably vomit.
Vomiting just before surgery or right afterward is not so great (compared to those times when vomiting IS great?) because you might choke on the vomit. That's the second thing: your swallowing reflexes are not up to par while you're under the influence of the anesthetics. Something could go down the wrong pipe and choke you. That is really not good. If it didn't kill you, you could get a bad pneumonia as result.
So, that's why we ask you to fast the patient for 12 hours before anesthesia will take place.
Of course, with a dog, we always proceed as though the patient has a stomach full of food. This is because sometimes people forget that he ate. Sometimes he finds something when he goes outside to potty, and he eats whatever he finds. He might do that anyway, but since he skipped breakfast, he's hungry and pretty likely to eat something. We once had a patient vomit a plateful of spaghetti. "I didn't give him that", said his owners, and I believed them. However, the evidence that he had eaten it could not be denied. So, we always treat the patient as though he has a full stomach (while hoping that he doesn't, and usually he doesn't).
Then there's Amos, here. Amos supposedly hadn't eaten anything since the night before. Fortunately, he didn't vomit until he was wide awake, so no danger of him choking on the stuff. He was looking good after surgery, recovering well. Then I went back to check on him again. He was wide awake, and had puked. Well, what a mess!
Wait a minute. What's that blue thing in the vomit?
That might be why last night's supper was still in his stomach, along with the pacifier (which he had been seen to play with the night before). Lucky for Amos that he was scheduled for surgery the day after he ate it, and luckier still that he vomited it up whole. Such things often make their way into the intestine, and cuase a blockage requiring major exploratory surgery.
So, that's why we always proceed as though the patient has a full stomach, even when he's not supposed to. Sometimes he does.