A couple of examples.

1) the Nez Perce Indians of the upper northwest developed the Appaloosa "breed". (not really a breed, but a color phase).
When the (ahem!) non-native people saw the brightly colored animals, they went nuts, breeding anythingbthat may throw a blanket.
The Indians had long neutered or euthanized and animal that had bad conformation or temperament.
Not the "white man".
Soon, the Appaloosa had a reputation of being bad tempered or nutty.
It wasn't until the late 60's until breeders finally realized they had to "weed out" bad traits. The Appaloosa has finally begun to be an animal with a somewhat stable temperament!

2) my nutty, pit bull crazy neighbor had a female that threw some awesome pups. She was always calm and friendly towards him....until he stepped in her pen to feed her one day! She attacked and latched onto his forearm.
He spent half a day at an ER getting patched up.
He got home, grabbed his hand gun and walked out to the dog pen where she greeted him, tail wagging in her usual friendly manner and he neutralized her!

3) a rodeo competitor was walking his family through the contestants parking lot when a pit bull bit his young daughter. Some young punk, too lazy to put his "stuff" up, chained a pit bull to his trailer to protect his gear. The child inadvertently got too close and the dog pounced.
The competitor got his family back to safety and told his wife, "I'll be right back!"
The dog was later found dead in a pool of blood!

As long as breeders are more concerned with $ instead of confirmation and temperament, these problems will persist.
Soooo.....I don't blame it all on the "breed", the breeder is also complicit by not neutralizing bad traits.
Sadly, until time (decades) and competent breeders can eliminate that "attack mode", the pit bull will have that reputation.