Thanks to thousands of years of breeding, dogs are like tools - there is a correct dog for every job.
The key is to identify the right dog for your wants/needs. If you need an alarm system, then a Chihuahua which eats 1/32 what a Rottweiler would will suffice. If you need an audible/visual deterrent than something larger would be more effective than a Lhaso Apso.
An often overlooked point is that there is a distinction to be made between a "working dog" and a "family pet". A working dog that becomes a pet is often inadvertently "broken" by a family. If one goes to the trouble to procure or train a guard/attack dog, then that dog cannot be a pet. It has a purpose and it's life needs to be devoted to fulfilling that purpose. As soon as people start feeding working dogs from the table, letting them casually living in the house amongst family members, lounging on the couch or enjoying air conditioning, they become pets and their effectiveness and predictability is questionable.
Pets can make for good alarm systems and in many cases can provide a degree security. A dog whose sole purpose is protection cannot and should not become a pet in the traditional sense of the word. Sure show a working dog affection, play/exercise with it, feed it well, take it to the vet and reinforce its training and purpose, but do not expect to be able to allow it to curl up at your feet at night, or snuggle with it on the couch during Americas Got Talent - that's a pet, not a working dog. The two are mutually exclusive and before getting a dog, one needs to be clear what role this animal is expected to fill.
The vast majority of the dogs I've had over many years have been pets. All of them have added much love and reward to my life. I remember them all for their individuality and joy they offered. Some were better pets than others but no two dogs are the same.
I've cared for one working dog in my life, when I was in the military. That dog loved me and I him. But never was their any doubt on the part of the dog exactly what it was expected to do when commanded to do so - Without hesitation, without fear, without fail 100% of the time. Lives depended on it and everyday was spend reinforcing the singularity of his purpose. He was a weapon and as such had to maintained and treated like one. The dog was never given the impression that it had a choice or was an equal member of the human pack.