Every person arrested or accused of a crime has the right to legal representation. In order to decide which cases to drop and which cases to prosecute, the police and related legal counsel must take many factors into account. For example, sometimes the victim of a crime will decide to drop their charges; this will affect the decision to prosecute since the crime might be entirely against that one person. If, however, a victim drops their charges while there are other charges pending, the case might still be prosecuted. Many of these decisions are made on-the-fly by legal counsel based on experience and on the random and unique factors of the case.
The police do not have the explicit power to drop a case; they may stop investigation, but the legal aspect is usually out of their hands. Once a person is arrested, their legal counsel and the prosecution office become responsible for their eventual case, either in court or under mediation. There are innumerable rules and regulations regarding these decisions.
Of course, a defendant with a past history of criminal activity is more likely to be tried even if parts of the case are dropped; a person with a cleaner background may be allowed bail, but the case might still go forward. In either case, the decision is made by the prosecution, not by the police or legal counsel. Essentially, the police fulfil their obligation by arresting and then investigating to the best of their ability; most further decisions regarding the case are made by the D.A.'s office, barring extraordinary circumstances.