If the caretaker doesn't assert himself as the indisputable alpha of the pack, a dog can turn on him, especially in more aggressive breeds.
Here's one example:
http://www.houseofthedog.com/2004/1...good_dogs_.html
Dogs aren't loyal to individuals. They're loyal to the pack. However, within the pack, they will use violence to settle who's dominant and who's subordinate.
The Real Hawkeye thinks Heidi protected him out of love. She didn't. She was responding to a threat to the pack. In other words, she saw a threat to the pack as a threat to herself. Her attack on the Great Dane was an act of self defense, nothing more.
Heidi never attacked The Real Hawkeye because she feared his dominance, not because she respected or loved him.