One lapse, one sneaked titbit or successful ‘theft', and the dog will try and try again, much as people get addicted to gambling, which activates exactly the same reward centres in the brain - this isn't only about the stomach! At the same time, you can install good habits in your dog by settling him comfortably in another place prior to preparing and eating your food. There, he should have his own meal, a stuffed Kong, or something nice to chew, so that he gets used to leaving you alone when you eat or when food is about. This makes staying away from you when you eat a rewarding action (something gained) instead of something unhappy (something lost).
Most dogs will then learn to go to their place in eager anticipation of their treat or meal once they realise you are about to eat. This outlines the principles of easy training by identifying what the dog wants, preventing the unwanted behaviour, substituting a wanted behaviour, and then rewarding it in order to reinforce it as a good habit.