"They" referred to here isn't usually the police. The police pass the results of their investigation on to the District Attorney's office, and "they" decide, on the basis of the investigation, whose ox has been gored, who's annoyed/scared by the bad joke, and the general political atmosphere, whether or not to file charges and which charges to file.
Cops arrest, prosecutors prosecute.*
*at least in the U.S. I can only assume there's a similar separation in Canada & the UK, and I could be wrong.