Dogs...all living things are pre-programmed to defend their food and valuables. If we weren't, we'd all starve. Some dogs will never do this guarding stuff because somewhere along the line, they've figured out that they don't need to. But some dogs have had things taken from them too much or scolded in association with their feeding or swiping things. You know...like puppies who grab something off the coffee table and they're told, "no." And the thing is ripped out of their mouths. When these things happen too much, some dogs will get growly and even snappy when they fear something will be taken. And many dogs will just resource guard regardless because it's an instinctive thing and some dogs are more instinctive than others. lol.
The idea of a systematic training protocol is to re-program their brains, their natural wiring to protect their belongings. (No Cesar M....it is NOT your food because you bought it or because YOU think you're the "pack leader.") lol. Once the dog has it, it's his. We can not go by our rules on this. We must go by the way dogs ARE.
Dogs can be re-wired to learn that their food or other valuables will not go away when people or dogs come near. And if they are taken, they get them right back again and besides that, they get even more fantastic stuff added to the loot. It becomes a win-win thing for the dog. Once this re-programming gets solid and consistent, it's unlikely that the dog will go back to thinking the way he use to. He will have a new lease on life. When he's eating, he'll look up and ask you, "well? Are you bringing something more? Come over here will ya."
Now, some cases are harder than others and some are extremely dangerous. If you ever feel truly unsafe or nervous, do get a positive reinforcement trainer to help you. I do not think that every single case will necessarily be worked though. But most can be.
There are lots of good links with information on this. Look for Ian Dunbar on resource guarding. He has good articles. There are many others too. Just don't believe anything that tells you that you are the pack leader, the alpha and it's your right to do anything or take anything you please from your dog and they should put up and shut up. No scolding, force or dominating your dog. You must change his mind about coming near his stuff...so he thinks it's a fantastic deal. And this can be done. There are loads of good tricks and recommendations. For instance....no food bowl at first since that makes it HIS. You control his resources. You're God to him because you provide everything. Since he doesn't own it in the first place, there's nothing to guard. Anyhow, it's too much to go into now for me, but hunt for Ian Dunbar, Jean Donaldson, Kikopup has some wonderful videos. Look her up. There are others too.