Such things happen all the time in the criminal "justice" system...Judge basically tells the defendant "If you don't like the way I screwed you over at trial, take it up on appeal." Meanwhile, the defendant sits in prison, awaiting his appeal, and trying to figure out how to pay for it, since he can't work and the wife and kids are on welfare 'cause the source of household income is in prison. I've seen this sort of thing happen frequently.
You forgot to add that on appeal, review of a trial judge's rulings are on an 'abuse of discretion' basis, whatever that means. Only the most blantant favoritism by a trial court judge will be reversed by an appellate court, which happens only when the appeals court would be too embarassed to not reverse the trial court judge's rulings. You are right, this happens far to often. It's even worse when an innocent accused is stuck with a public defendaer who is more interested in getting along with the prosecutor than defending his client.