Well, obviously, you haven't had to deal with the situation. Who is the one that decides whether or not you broke the law in shooting the dog? The county prosecutor (here in North Dakota, it's the state attorney, which is equivalent to the county District Attorney). The police don't make the decision... they gather the evidence and then write up a report which gets submitted to the DA for review. It's the DA who decides whether or not you get charged with a crime, and in today's broken criminal justice system, they're more likely to charge someone like you (someone who has never had an encounter with the legal system and doesn't know how to fight back, what they can get away with, what they can scam you out of, financially... legal representation, fines, et al). There are so many laws that are hard to navigate, to know for sure whether you're breaking them or not, today unless you have legal representation. More money being spent for your legal representation that you really shouldn't need, but they make it so that you need them.
That's why I said I have a Catch-22 situation here where I live. The town ordinance doesn't allow for firing a firearm within the township limits, yet, the town is so small, and is so rural, that I would be covered by the state law for protecting my livestock I'm allowed to have inside the township limits from any predators. So, if I want to protect my livestock, what do I do? I can't shoot any predator because of the town ordinance that doesn't allow firearm discharges, but the state says I can kill them. That means, poison, which isn't humane, and could also harm my livestock as well. Shooting the predator is the most humane because it is the quickest execution without harming my own livestock or myself (because I would have to come within the predator's range to be able to trap and remove). Also, there are laws as to which animals you can eliminate, and each state is different, as well as federal laws protecting those animals. Do you know which ones they are for your jurisdiction? If you don't, then you've opened yourself up to all kinds of legal traps.
So, you get arrested, and that arrest goes on your record, for shooting a dog, because the police aren't going to make the decision of whether you were in your rights or not... the DA will make that decision, based upon what the police report says. It's an arrest that doesn't come off, if you're found innocent when you stand trial before a judge, or jury. It remains on your record that you were arrested, unless you have it sealed. You're going through the hassle of the legal system to prove your innocence. It's not an easy system to navigate for someone who has never been through it before.