For many reasons, dogs of all types and sizes, sometimes attack humans. One can't just say that any attack deserves the death of the dog. I believe that each circumstance must be looked at on it's own merits. The history of the behaviour of the dog must be taken into account and the actions by humans and the dog that led up to the attack. All the circumstances should be considered before putting a dog to sleep.
Any dog that is mistreated can learn to mistrust humans. These dogs can usually be retrained and can learn to trust again. Not all of those dogs can relearn trust and that is extremely unfortunate. Those dogs may have to be put down if they attack humans.
Some people say that dogs aren't born mean. While I do agree that the vast majority of dogs are not born mean, I do know that some are. Genetics do play an important role in a dogs attitude and behaviors to a great extent. For these dogs, I see very little hope. Training can not necessarily stamp out genetics. It is not feasible to assume that an owner can keep the dog out of any circumstance that would allow the dog to attack or bite someone.
I owned a Cocker Spaniel and she was the love of my life. She was given to me when she was 8 weeks old. I later found out what her parental line was and discovered that all the bad points that was in her blood line were in her. Looking back over her family tree, it was obvious that as the tree grew, the breeder was breeding out the good stuff until eventually all that was left was not good at all. My dog was beautiful to look at, but her personality was horrid.
She was trained from a puppy and was well taken care of from the beginning. Regardless, she had food aggression, was overprotective of me and babies and had dog to dog aggression. I worked at training her for years. I tried various techniques and ideas that many trainers taught me, all to no avail. I couldn't leave her out when we had company, because she became aggressive to our other dog.
Finally, in the last year of her life, I stumbled upon some training techniques that acutally worked. All of her aggressions greatly diminished. I could even take her for walks in public, though I still used a muzzle as a precautionary measure. She still had her aggressions, but they were manageable.
Much to my dismay, my beloved pet snapped one day and attacked my grandson. She was sitting across the room from him and deliberately took off and attacked him without provocation, puncturing his face in several places and she almost got him in the eye.
She was 6 years old. I had her put to sleep the same day. It was the most heart-wrenching decision that I've ever had to make, but I couldn't take a chance that she would harm another person. Fortunately, my grandson suffered no disfigurment or severe damage and he still loves dogs.
Each attack or bite must be looked at on a case-by-case basis. The severity of the attack must be examined along with the history of the dogs behavior and actions of the people surrounding the dog. From this examination, a determination can be made whether or not the dog should be put down. Putting a dog down should not be automatic.