In most places a dog would be put down for attacking a person
Yes, and that’s sad since it’s the owner who is at fault for not controlling the dog.
Dogs will be dogs. Owners are supposed to train them to behave.
The owner should be put down and the dog given to someone who cares, but that’s not how the law usually works.