Animals, like people, have personalities and psychological traits. Just like no two people are the same, no two dogs are the same, and some dogs are predisposed to having certain personality traits/characteristics.
And yes, some dogs, just like some people, are mean or mentally broken. The problem is that with dogs, due to breeding practices, we have honed/refined some of those traits. Boxers box, not because we make them box, that's something that's bred into them; something that they "do". Newfies have a very strong rescue instinct, again, something we've bred into them/enhanced.
It seems with certain pit bull terrier examples that the fighting instinct that was bred into them, even when they are not raised in an environment where that is utilized, can randomly come out; the dog "snaps" and goes into fight/kill mode. It could be something as simple as a toddler touching its sensitive bits or pulling on its face and the dog has zero history of violence. It has happened enough times that these dogs have a reputation now, and that's not because people hate them, its because there's a trend of this occurring and it is something to be aware of. We had a huge Newfie for many years (he passed away a few months ago). When my kids were little they'd be climbing and bouncing all over him, hanging off his face, we never gave it a 2nd thought, because Newfs don't have that reputation and his personality/temperament reinforced that.
This is a good point. Our newfie was on our front lawn when he was a little over 1. A little ankle biter from down the street was being walked, and it came up our lawn and when Belv went to sniff it, it bit him right on the face, totally unprovoked. He didn't know what to do! He'd never been bitten before, he didn't try and kill the little dog or anything, but he recoiled and was extremely upset by the interaction. However, after that, he absolutely hated that dog, and little dogs in general and he would vocalize that if one got near him, and that was a lifelong trait. If you introduced him to a little dog, he was always extremely leery about it until he really got to know it because of that single interaction.
Our neighbours at the cottage had a golden retriever that was a complete a-hole that they let freely roam. It came over and also bit the Newfie (who was on a chain). Again, he had no idea what the hell had just happened, he was at "his place" and this little bugger just shows up and chomps on his face. That dog was psychotic and should have been put down years earlier, I watched it bite the owners several times when they were trying to control it, it would go full feral. That's exactly what it did when they tried to bring it home as it stayed just out of range of my dog's chain after biting his face, it bit the owners hand very hard and drew significant blood. I wanted to shoot it, but figured that would cause more problems than it solved. It died last year anyways, but that's an example of a dog that's just broken with absolutely no reason to be, it wasn't abused or raised badly, it was just nuts.