Rottweilers were initially used as herding dogs in Germany (so says Wikipedia...I know it's not reputable). Anyway, more recently (recently as in WW1 and 2) their role has switched to one of "guard dog". Breeders would select bitches and dogs most likely to exhibit aggressive behaviours towards strangers, resulting in a "better gaurd dog".
These behaviours are genetically ingrained and have nothing to do with their brain size. That being said, behaviours are a result of both genotype and phenotype (environmental influences), so not all rottweilers will be aggressive and snap at people. And of course, there are rottweilers that exist that were never bred to be a guard dog.