Re the courts. Unfortunately there is much misunderstanding and misconception around sentencing. There is a set of national sentencing guidelines, freely available on the internet, which the courts, in general, must follow. It is the grubberment who make the laws and policies which drive sentencing.
Contrary to belief the courts do not randomly sentence, though I appreciate that when we see some sentencing outcomes it does appears somewhat random and inconsistent.
Also remember that in hearing every case the courts are privy to considerably more information and evidence than the public access on social media.
Re the circle continuing, now enter a very deep debate about punishment and rehabilitation. If interested research the Norwegian model.