Justice in Of Mice and Men is a might be considered a "cowboy" concept. The ranch has its own sense of justice, and the book is acutely tuned to the social mores of the ranch, not the larger world. There’s no higher order, and no sense of whether justice is dictated by ethics, legal precedent, pity, or even common sense. Slim, the local ranch man of wisdom, hands down decisions, and the people around him accept his word as what’s best. Justice, in the traditional cowboy sense, is not easily served. Sometimes it means you have to get beat up without recourse because you had it comin’, and sometimes you have to kill your best friend (whether he’s a man or a dog) because it’s the only thing to do. Justice is not a pristine rule of law here, but more a set of social intuitions that just are the way they are.
Lennie has no grasp of the consequences of his actions, so meting out "justice" to him is absurd.
On the ranch, Lennie is not immune to justice, even if he is mentally disabled and did not understand the consequences of his actions.