99.9% of the time how a dog behaves is how it was taught to behave from it's owner aka pack leader.

You will unfortunatley find the 00.1% of any breed that is just plain screwed up, and nobody can correct that. However, any good owner would have recognised the signs and done everything in their power to correct it or taken steps that this dog would never be put in a position that it could attack.