This happens quite a bit. A nearby small-town PD paid $10,000 for a “dope dog”, and the dumbass handler left him in the car on a hot day and killed him. Our local PD decided they needed a “dope dog” as well (it’s a big cop fad, apparently) and bought one for the same 10 grand. A nearby Sheriff’s department offered to GIVE them their dog, who they decided was useless, but NOOO, the cops had to burn 10K of taxpayer money. The dog was worthless, and when the “handler” went to another town, he took the frigging dog with him. No explanations were forthcoming, as is usual in small-town politics, where nobody with a life wants to get involved in the local govt.
I am not sure with the civilian dogs however when the services train the dogs the handler is always there. The handler eats, drinks and sleeps with the dog.
When the handler leaves the military the dog is considered not able to be retrained so there is a choice. Put the dog down or let the dog retire with the handler. At least that was how it was in my younger days.