That's a lousy attitude. Dogs are naturally territorial; biting a trespassing stranger does not mean they are vicious and deserve to die. Dogs are also most often a loved family member, in addition to something that family has spent a lot of money on.
Here's an idea....don't trespass in someone's fenced in yard with a dog in it, without first notifying the homeowner and getting their permission.