Here's the deal (pun intended) on judges and the ability to reject plea agreements...
Often times, a plea deal involves a prosecutor amending a charge to a lesser offense. Often times, the proposed charge has nothing to do with the reality of the case. For example, the new charge may ignore the actual weight of the drugs involved, or the value of property at issue. There was a famous situation here in Ohio where a city prosecutor was pleading out a ton of traffic cases to an old statute from the 1900s which required the owner of a car kept on the street to keep a small lantern burning on the hood so the car was visible in the dark. The judge has the complete authority to call bovine scat. The parties can try a new deal (which they did here), the case can go to trial, or the prosecutor can dismiss the case at hand and file a new lesser charge to get the deal done around the judge. Really, I admire this judge for taking a stand. Too many judges just go with the flow to clear another case off the docket.
Plea bargaining is what's wrong with the system. It encourages prosecutors to overcharge cases to give room to negotiate. It encourages defense attorneys to look for an easy/lazy resolution that is the least bad resolution for the accused. It encourages judges to allow legal fictions just to keep up with the docket overflowing with cases. The problem is that plea bargaining has become such a part of the criminal system, it's hard for anyone to take a stand against it.