Do people really think their dog will protect them? Presumably they have not been in a situation where they were being attacked to know how the dog will respond to the attacker
You never know for sure (unless they’ve been trained to defend you) but a large dog that barks is a good deterrent.
I walk a large, male GS who is always on a lead because although he’s lovely with people he’s unpredictable with dogs. He doesn’t like dogs getting in his face and hates bull breeds as he’s been attacked twice. If a dog runs at him he’ll bark loudly and lunge. That deters most dogs (and humans) from getting close.
A couple of times he’s taken a dislike to random men when I’ve walked him. One man stared at us for a long time, unnervingly. Either dog sensed my unease or saw the man’s staring as a threat, but he went on the defensive, barking and lunging towards the stranger (he couldn’t get to the man thanks to the lead but the man hurried away).
Another time a man walked very close to us on a wide path, no idea why, but he sort of walked next to us whilst looking straight ahead and kept pace with us. Dog started off curious, trying to sniff him, then suddenly saw him as a threat; he went stiff and barked at him, wouldn’t stop barking. I stood still holding dog to let the man get ahead. The man walked slowly and kept glancing over his shoulder at us, and every time he looked back GS barked and strained, hackles up. We took another route home that day!