IMO most bites happen because people are stupid, and do stupid things. They are also ignorant of canine body language, and fail to see the more subtle signs such as whale eye, stiff body posture, ears back, lip-licking, etc. They also fail to see things in context. For example, at work in boarding there was a Bernese Mountain Dog boarding with a cute little black 'n white pit bull. The pit bull was all kinds of friendly, but the berner was extremely uncomfortable being in the kennel (and head shy, try to pat him and he would do the dodge). I saw a coworker with them in the yard and he was patting the berner and even kissing his face while the berner threw off all kinds of whale eye and a stiff body posture while licking his lips. I am surprised much of the time that dogs don't bite people MORE. Then take the borzoi that is boarding at work. He will also keep his ears flat against his head and lick his lips (his mouth is brown from drool), however he will lean against people for pets and comfort. The berner and the borzoi throw off some of the same "I'M UNCOMFORTABLE" signals, but the difference is the berner is terribly afraid of both humans and being in a new situation, while the borzoi is only stressed out because he's in a kennel away from home, but he is still a stable dog with people.
And I do know all too well that some dogs are just broken on the inside and cannot be fixed. I've met dogs like these. Heck Daisy is a dog like this. Her dam was friendly, and I was told her sire was a big happy stupid thing, but Daisy came out with a poor temperament. I remember when I met her 8 week old self at my friend's house. They brought her out and she didn't interact with us, she just sat there. And anyone who has met lab puppies knows that that is very uncharacteristic of the breed!
"Give thanks to God for being dog. He gave us the joy of angels." - Trixie Koontz, Dog, Trixie Treats & Holiday Wisdom - Christmas is Good!