Our two family dogs did this in their lives too. First was an old English sheepdog. Mum was pg with me and he was sitting beside her in the backyard. Someone came around to do some work and ended up between the dog and mum. Dog went bananas. He never did it again (he was about 4 at that point). Second time it happened was with a golden retriever. Someone came to mum's door that she didn't know and asked to come inside to use the phone. Mum was really spooked and the dog stood beside her and growled. Again, never happened before or since. This dog was also viciously attacked by another dog years later and she didn't fight back, just lay on the ground, so not a mean bone in her body.

I think that your dog obviously felt threatened somewhat by this man and felt it was her job to protect you. I have a feeling that if he had come in with you, she may have reacted differently but they do pick up a certain vibe from the way you're feeling.