While i agree the judiciary is rotten from the inside, the logic behind it is:
Because the judges have to first and foremost not live in fear of their lives so that they can pass a honest and fair judgment in every case. If every judge was afraid of being investigated and arrested all the time, he would not be able to exercise independence and his powers will be abused no matter what the actual problem is.