Why not run? What is it that makes some dogs run and others try to scare off the passerby?
Some of this is about my dog, some is about other dogs I watched.
Depends what has worked for the dog in the past. If a dog has successfully scared someone away several times by running and barking at them then why would it stop doing what it's doing?