In this case Cohen did a plea deal so the judge just basically provides the sentence. Plea deals are rarely appealed. Sentencing can be appealed unless part of the deal is to wave appeal. In other cases ruled by a judge one can appeal. So judges judgement which is interpreted as being wrong can be overturned or changed. In these instances an interpretation of wrongness would in a word trump a judges ruling.