Street / stray dogs that can get out of the way and avoid being physically hit or beaten will usually opt to get out of the way. It's of no benefit,reward and comes with a higher risk for them to fight back when they can just get away but some will and when they do, it'll be a harsh lesson learned for the person concerned.
Dogs that are abused and beaten when they're confined to a room or chained / tied and unable to get away will either fight back with everything they have or develop what's known as "learned helplessness" i.e. they have learned there is no point in fighting or trying to get away because no matter what it does, the outcome will be the same.
Some breeds are naturally more docile and less inclined to react and fight back than others. Some that are naturally sweet and have a loving, gentle temperament can still pop a button and rip the throat out of someone if pushed so far.
My eldest dog is a friendly, gentle natured soul but confident and would rip someone to bits if pushed. The youngest came from a poor start to life and is the sort that if you hit him 10 times in a row he'd still come back to you the 11th and yet physically, he's built like a tank and immensely strong.
All animals have the capacity to turn and unleash on humans they have learned to distrust and the worst I ever saw was when I was a kid and a huge Shire horse I used to ride nearly kicked a farrier to death. I honestly believe if I hadn't been there she'd have killed him and yet this horse was the most gentle, docile and kind soul I ever met.
Farrier was just horrible and abusive for fun. He never treated the horses with even the slightest respect and one day when he'd been at the farm, the Shire was heavily in foal ready to pop any day. Being an ******** he grabbed her leg without giving her warning and being heavily in foal and not expecting him to pick her foot up like that, she lost her balance and put the leg back down as she stumbled.
He kicked her with full force and in steel toe capped boots so hard the sound was horrific and I was only about 10yrs old but told him she hadn't meant to slam her foot down and just lost her footing.
He swore and called me all sorts then his next visit, she had the foal with her and I saw the way she eyed him from the second he pulled up on the yard. Always kept herself between him and the foal and it was unnerving seeing the way she behaved. She was just under 19hh and I had to climb on the field gate and still jump from the top of it just to get on her back she was huge but a true gentle giant in every sense. Idiot got himself in the perfect spot for her to kick him so hard he literally flew through the air, bounced off the timber stables before landing in a heap and she turned her backside and was gearing up to finish him off of that I'm absolutely certain.
Foal got anxious amid the commotion and trotted off and I yelled at her to stop and come with me so she followed suit probably more to catch up with the foal but I swear she'd have killed him there and then and never have I been as shocked or shaken up.
The worst and most dangerous thing you can be is someone animals neither trust nor like. It can get you killed in a heartbeat.