Unfortunately many police forces have no training in dogs, and so officers don't know the difference between an aggressive attacking dog and a playful bouncing dog, and thus shoot them.
EDIT: It's especially unfortunate if the dog has been tasered and is safely caught in a noose at the end of a stick (http://www.denverpost.com/opinion/ci_22895415/police-dog-han...), or if the police have visited a family to tell them that their son has died, and then they shoot his dog while they're there. (http://www.timesdispatch.com/news/henrico-police-shoot-pet-a...)
Hard to tell that until it's too late.
If you do live where the city or country doesn't have centres that humanely kill strays and/or the government doesn't have a protocol for dealing with them, get some thick boots, a strong stick and hope you don't run into one of the 10+-strong packs that roam certain neighbourhoods.
In case there's a stray dog that's aggressive towards people and lives near your home and you definitely positively must put it down, a common humane poison is antifreeze - it first induces drowsiness, then stops the heart. A pretty literal "put to sleep".
Section on "dogs."