I've heard of bad attitudes from US court systems and prosecutors, insomuch "throwing charges at people isn't that bad, they are assumed innocent until proven guilty anyway" or "its the adveserial system, I can lob bad charges and it is up to the accused and the system to right my wrongs".
Oddly, I've worked in the system since 1979 and never heard that from prosecutors.
So; here are the protections. First, the police can't charge without meeting the standard of 'probable cause;' courts usually find probable cause when there is a reasonable basis for believing that a crime may have been committed (for an arrest) or when evidence of the crime is present in the place to be searched (for a search). If there is no probable cause, no warrant will be issued, and if there was a warrantless arrest (most are), and either the magistrate or a prosecutor finds the arrest lacked probable cause, the case will be dismissed and the arrestee discharged. Cops HATE having arrestees discharged without charges, as now they face complaints, disciplinary action, or a civil suit, so arbitrary arrest is seldom a good strategy.
The first judge to see the affidavit for a search warrant or the 'probable cause statement (of an arrestee)' will look over the paper wortk for evidence of probable cause. No PC, no search or arrest warrant, and if an arrest, the defendant's case is dismissed without hearing. Judges dismiss such cases without interest in what the officer thinks.
If there is an arrest for a felony, the prosecutor ALSO looks for PC in the officer's forms. No PC means the case is dismissed by the prosecutor - to continue a PC-less case means the prosecutor can face internal discipline or even disbarment. Prosecutors routinely dismiss felonies for which they do not see adequate PC. They don't care what the arresting officer thinks.
If the jurisdiction requires a grand jury for charging defendants or uses instead preliminary hearing, a judge oversees the grand jury's decision (from evidence presented solely by the prosecutor) and can reject their decision if he/she doesn't agree there is PC. In a preliminary hearing, there is an adversarial hearing between the prosecution and defense (the accused has a right to a lawyer); if the judge doesn't find PC, the case is dismissed. Judges don't care if the prosecutor gets miffed. I've seen one double murder dismissed at prelim.
Next there will be pre-trial motions hearings, wherein PC is again contested between the prosecution and defense - some cases are dismissed here as well. Judges get paid whether they continue or dismiss charges or motions.
Finally, the pre-trial portions of the case are over. If the case has survived this far, it is really likely the defendant will be convicted. If one pleads guilty, pinishment is usually less than if the defendant is found guilty - a defense attorney who doesn't explain the strength of the evidence and likely outcome with the client is guilty of malpractice. Most choose to plead guilty at this point - remember, the defendant knows whether or not he/she committed the crime.
The system very much works within the spirit of Blackstone's ratio - ‘Better that ten guilty persons escape than that one innocent suffer’: William Blackstone, Commentaries 358. The same principle occurs in Genesis 18:23–32.
Is it a perfect system? Nope, but show me a more just one anywhere in the world. You see just as many (if not more) whining that the system is too lax as you see whining about how defendants' rights are being violated.
Whast you see on TV, the movies, and see bandied about on the internet is mostly just mule cookies.