DoD hardware for police usually comes with contracts that state they have to be maintained in working order, because the DoD can just take them back if there's a military need.
Effectively, it's the PD paying to warehouse and maintain DoD equipment for them, as long as the DoD doesn't mind the stuff getting used once in a while.
It's a cover. The military is never asking for this equipment back unless they're conscripting the cops to the front line in the Rockies because of the surprise North Korean invasion.