I have been attacked by a dog, and it was an Afghan Hound. I was in the wrong place at the wrong time.
Dogs will attack for various reasons, you can't really blame them for that, it's in their nature to use their teeth instead of giving you a punch in the face. Pit bulls will do somewhat more damage due to their upperbody and jaw strength which allows them to hang on and savage you a bit more.
But any dog can have their temperment spoiled by an incapable/indulgent/abusive owner.
Once your dog begins to show aggression and bite you either have to 1) start from scratch and retrain it with a lot of discipline and very little independence, 2) give it to somebody who can train and correct the bad behavior properly or 3) put it down before it hurts somebody. People always come before dogs.