Instinct. I suggest you try an experiment the next time you run across any decent sized dog. Make some overtly aggressive move --- Pretend you're hurting it's owner.
Hell, I had a 50 pound mutt from the animal rescue league that was as friendly as any dog I have ever seen who would have ripped you apart if you trying to hurt any of 'her people.' The dog did not allow anyone to do anything that looked like aggression to anyone in her family.
She wasn't trained to do that. It's instinct to protect her "pack." That's why dogs are used for police work. The guys with the blue uniforms are their family.
As far as a dog "protecting its own", fresh meat will take care of that problem.