I don't know how common this is with dogs but my dog, an Entlebucher mountaint dog, has a fairly complex moral system when it comes to food. Namely, she seems to have an internal rule set on what it is okay for her to take food.
Here's an example of my dog's morality in action. If my wife brings me a plate of cheese and crackers, she can set it right in front of me and the dog. I could get up, leave the room and come back without fear that she would take it. However, if I begin eating it and then leave the room, there is a point where if I were to leave the room that the plate would be picked clean when I returned.
Similarly, we have a walk in pantry filled with food (including her dog food). Bread, crackers, cookies, etc. are all within easy reach of her. We keep the loafs of bread on a shelf that is eye level. We never keep the pantry door closed and she won't take any food from there. However, if I take the same bread, open it up and eat a slice and then put it on the table, the dog will eat the entire loaf right off the table if I walk away. However, put the same loaf back in the pantry and it is safe.
Over the years, I've tried to experiment to learn how her seeming morality system works. She won't ever steal food in front of someone unless it falls to the floor. Then it's fair game. If I'm lying around on the couch with a bowl of chips on the floor in front of her, I'm safe. If I get up and leave to go to the bathroom the bowl is safe also. But if I have eaten a sufficient amount of it and leave, the bowl gets chowed down if I leave for just a few moments.
Those of you with dogs, have you encountered this sort of thing?