Most prosecutors have 90% conviction rates because they charge you with something that carries up to twenty five years in prison if a jury convicts you, and then they offer to lower it to something you will get probation for if you plead guilty. Judges are not bound by plea agreements, but they usually do follow through on them. Most people just are not going to risk a jury finding them guilty and getting a sentence that is twenty times worse than what they can plea bargain for, even if the original charges are trumped up. They always try to get people to plea guilty even for serious cases, go to jury you risk death penalty plea guilty get life, go to jury and get life in a shitty prison plea guilty and get eighty years in a less shitty prison etc. The prosecutor will almost always give you trumped up charges and then plea bargain you down to ensure a conviction.