Because the dog has demonstrated that he will viciously attack (non-violent) people. Its one thing for a dog to attack someone breaking in or hurting its owner—its another thing for it to maul a 12 year old girl. If I owned such a dog, I’d have it put down—for liability reasons.
The dog attacked someone who was encroaching on its territory.
And it shouldnt matter if it attacks a 12 year old girl or a 40 year old or some guy breaking in. How is that different than the rationale for a hate crime - the crime is worse based on who is hurt.
Must be nice to be able to kill something just to avoid liability issues.