Proper training for a dog isn’t a punishment. It’s a contract between you and them. It reduces stress, forms a stronger bond, and can make life easier for the both of you.
You don’t need to be your dog’s Supreme Commander or anything, but it’s important that both you and your dog know the rules in any situation before it comes up.
On a serious note, your dog tricking guests out of food is risky behavior, because the dog thinks it’s a game and as soon as someone doesn’t play along your dog will become frustrated and might lash out.