Im going through a court case at the moment the judge gave me a roasting but he didn't give me an opportunity to reply do you think this is fair by the way i am innocent.
The reason that we have a law for contempt of court is so that the judge can maintain control. If everyone tried to argue with the judge and there was no sanction then court proceedings would quickly turn to farce.
Therefore to maintain order the Judge must be able to punish people who don't follow court procedure. If the judge chose to give you a roasting then maybe you need to ask your solicitor what you did wrong. Maybe it was something minor that the judge expected you to know, but didn't
It's impossible to give a satisfactory answer without knowing more of the case.
It is fashionable at present to criticise any symbols of authority, police, judges etc., often unfairly. Judges are appointed after a lifetime of distinguished service and are rarely wrong. To appear before a judge, you must have been represented by a lawyer. What does he/she say?