They don't of course:

According to [Norm Stamper, former Chief of the Seattle Police Department and author of Breaking Rank: A Top Cop’s Exposé of the Dark Side of American Policing], having small local police departments go around with tanks and military gear has "a chilling effect on any effort to strengthen the relationship" between the community and the cops. And that’s not the only danger. "There’s no justification for them having that kind of equipment, for one obvious reason, and that is if they have it, they will find a way to use it. And if they use it they will misuse it altogether too many times," said Stamper.