Cal4D4...
"Anyone help me to come to grips with the disparities?"
Sure.
In the case of Law Enforcement having to kill a dog guarding drug dealers or other criminals, the dog is being used in the commission of a crime. Technically not the dog's fault I suppose, but have you ever tried to explain that to a dog who is in the middle of trying to rip your throat or groin out?
In the case a K-9 dog being used to help Law Enforcement, the dog is being employed by the good guys to help stop the bad guys. Now, disregarding any extraneous issues of your or anyone's else's feeling about the law(s) in question, the dog is being used in a positive and legal manner instead of a negative and illegal manner.
I hope that this can help you understand. No disparity at all.