Every week in every Magistrates' Court and Crown Court there are judges and magistrates making sentencing remarks to convicted defendants.

Often this is a pointless exercise. Words of admonishment or of encouragement are likely to have little or no effect. Indeed, one can wonder why such remarks are made. All that the defendant will usually want is to know what their sentence will be and not receive a pep talk from the bench.

Perhaps there is a good argument for stopping such remarks but it may well be that, in certain situations, they could make a positive if marginal difference.

And if that is the case, then it is in the public interest for the remarks to be made: less re-offending is for the good of everyone.

However, sometimes these comments are clumsy or crass. And sometimes they can be reported out of context by a sensationalist media, packaging the story to get outrage from readers and quotes from politicians. After all, is the attitude, judges are always out of touch; it is just a question of finding examples.

So with this in mind, let's look at the case of Judge Peter Bowers, the judge who has caused media and political uproar because of his apparent commendation of the courage of a burglar.

The full sentencing remarks are not actually available (though that will not stop many people having very strong opinions), but the fullest report appears to be from the newspaper which broke the story:

Judge Peter Bowers admitted he could be “pilloried” for his decision to let a serial burglar walk free from his court. He said: “It takes a huge amount of courage as far as I can see for somebody to burgle somebody’s house. “I wouldn’t have the nerve. “Yet somehow, bolstered by drugs and desperation, you were prepared to do that,” he told Richard Rochford, the man in the dock yesterday. He accepted that Rochford, 26, had been harmed by prison. “I think prison very rarely does anybody any good,” he said. “It mostly leaves people the chance to change their own mind if they want to. “I don’t think anybody would benefit from sending you to prison today. We’d all just feel a bit easier that a burglar had been taken off the streets.”

This tells us two important things. First, the judge seems to be aware that there would be an adverse public reaction to his comments. This suggests he is not naive. He acknowledges how badly the remarks may go down, but he is going to make them anyway. This may be because of arrogant stupidity, or because he had the courage to realise any positive impact would be worth being "pilloried".

Second, the remarks seem to be in the context of not sending a defendant into prison when it looks like it was a previous imprisonment – and the availability of drugs in a prison – which formed part of the reason why the defendant resorted to burglary.

Nonethless, the reported comments are strange.

No one who has ever been burgled will think that it is an exercise of courage, or indeed of any other virtue.

But what the judge was evidently seeking to convey is that a burglary is not what people would normally do but for (in this case) the "drugs and desperation".

However, there are many other ways of making the same point and one would expect an experienced judge to have said something more appropriate. Indeed, according to the Daily Mirror, the burglar himself denied that he had been courageous:

I feel sorry for what I did because I know what people feel like to get burgled. I know what my dad felt like when he got burgled. I feel bad for what I did. I know it won’t make up for what I’ve done but I am sorry. I don’t think burglary is a courageous thing to do. I felt awful about it to be honest but I can barely remember even doing it – I was on 60 to 70 valium tablets a day at the time.”

That last sentence is important. Remember the judge said it was "drugs and desperation" which made the defendant do something he otherwise would not do.

The burglar added:

I do think the judge was right to not put me in prison because last time I went in, I took drugs and if he’d have put me back in there, I would have taken drugs again, I would have gone on to commit more crimes. There’s no chance I’ll be getting back into drugs. I start a new job in a week’s time.

We can only take the defendant's comments at face value, but if sincere then there is a lower risk of further crimes being committed.

And if that is so, then the tragedy in this case is that an example of the criminal justice system working – in that there it is less likely that there will be re-offending by a defendant – has been converted by the media into a classic "law is an ass" story.

The sensible response to the remarks is that of Frances Crook of the Howard League for Penal Reform who told me:

Comments that appear to belittle the seriousness and trauma of domestic burglary are unhelpful, so while the sentiment was mistaken, the sentence was correct. Community sentences have a far better track record of helping people into crime free lives than a short prison sentence and that means fewer victims. Those who advocate prison sentences indiscriminately have to accept responsibility for their failure and the next victim should be on their conscience.

In passing the sentence, and in attempting to engage with the defendant in his sentencing remarks, Judge Peter Bowers said something which was at best unfortunate.

But that was not the only thing he did.

It would appear that Judge Peter Bowers imposed a sentence which was both correct at law and also likely to lead to a lower risk of the defendant re-offending; and he should be praised for doing this, even if his remarks were obtuse.

David Allen Green is legal correspondent of the New Statesman