There are some dogs out there that have a bad reputation for being vicious and in some of the cases such as Chihuahua I believe that there is a greater opportunity for them to be aggressive and territorial, but this attitude is largely up to the training that the receive and the sort of environment that they grow up in.
I have a friend who has a family member that has 3 Chihuahuas and they are lap-babies who just love to be around and touched by almost anyone. They are also very attached to their owner because she showers them with attention and also takes the time to socialize them with other dogs.
While Chihuahuas and perhaps Pit-Bulls are the extreme examples, for the most part dogs, I think, end up behaving how they are taught to behave by their owners.

src
The above image is taken from an article from Discover magazine that I found quite interesting and inspired me to write about this topic using my own experiences, click the link to read it for yourself if you feel so inclined.
Most of the people that I know personally, train their dogs to be friendly even if that dog is kind of known for being capable of incredible violence. Take my friend Mark for example: Mark is a trainer of Muay Thai boxing and is quite possibly one of the most lethal people I have ever met in my life. He also happens to be an absolute sweetheart of a person who would never hurt anyone unless he absolutely has to. His extremely heavy American Pit Bull looks the same but through years of training, "Lucy" is anything but terrifying. Mark can be seen walking Lucy on the beach on a regular basis and while Mark keeps Lucy on a leash and monitors her every move (because she is indeed herself also capable of great violence) Lucy is actually very sweet and just wants you to pet her any chance that you get.
According to Mark Lucy has only ever once lashed out at anything and that was an instance where some buffoon had the incredible misfortune of starting trouble with Mark at a local pub. Lucy, somehow being able to see into Mark's mind and see that her owner was uneasy took things into her own hands and began that terrifying territorial grown and bark that is something only a handful of dogs seem to be truly capable of.

src
Mark restrained Lucy, but didn't tell her to stop. Lucy was only reacting to the uncomfortable situation that was not created by her owner and because of Lucy, the situation quickly de-escalated because the other person probably didn't want to lose an arm that day.
The thing is, I have been around Lucy hundreds of times and she has the temperament of a Golden Retriever who has been played with daily. I offer to take care of Lucy when Mark needs to go out of town with absolutely zero fear because unless you pose a threat to her or Mark, Lucy is not going to do anything.
The same thing can be said of my own dogs: I have mixed-breed rescue dogs, 3 of them in total. All of them are a bit damaged because of their lives before they came into mine, but they are all very friendly and willing to approach anyone who is friendly towards them, just like me.
Another example is a dog named "Chex" that is a small breed long haired mix. This dog has been mollycoddled since birth, and her owner treats her as if everything in life is really dangerous. A lot of things are dangerous such as the road or potentially other dogs, but in Chex's situation, she has never been allowed to interact with other animals and has always seen them as a threat directly because of her owner. Chex is now 5 years old and is basically terrified to ever be on the ground and will recoil in fear any time another dog is around, including my own dogs that have never harmed another dog at any point in their lives. Chex is afraid of everything because her owner is afraid of everything.

src
I think in almost all situations that if a dog is raised by a vicious person, that dog is going to be vicious itself and if the dog is raised by someone who is shy and afraid of social situations, that the dog is going to behave the same way. It has been my experience that nearly every dog ends up taking on the behavioral traits of whoever is around them the most, almost as if they can sense your aura, your feelings, your fears, and the things you love.
I find this ESP of dogs to be wonderful and I also think that as a pet owner that this sort of thing is unavoidable and for the most part, provided you are a decent person, that you should embrace it.
I do think, however, that is very important to socialize your dog with other dogs if it is possible. Once they reach a certain age it might be too late to try to get them to change their ways and I have seen pet owners who have had so little social interaction with other dogs that they get really uneasy or jealous if their owners show affection to any dog other than them.
You ultimately are responsible to how your dog ends up behaving. But even if you do nothing that dog is likely going to take on some of your characteristics whether you want them to or not. A bond between a dog and their owner is like no other, and that is part of what makes them so popular as companions all over the world.