contrary to or forbidden by law, especially criminal law.
So what we have is a group of people have come together and decided that "something" is not permitted within a "Jurisdiction", and have given another group of people the right to take physically action to hold the a body, and to confine that person until another group of people have time to review the actions to verify that in fact x did do the said action. If he did, he may be given to another group to hold by force until a specified amount of time has passed. We do not encourage torture, but do permit it from other detained.
And thinking and actions of people makes it so, and legal, aha, permitted and paid for by the government at the behest of the people. No one person does it all, so no one person sees the total treatment, for if they did see, they would instinctively know that something is just wrong with parts. No one (few) comes out who is not bitter, disenfranchised, damaged, and has much hope of not re-offending.
Now consider what is considered wrong by our culture. Our ancestors decided some thing should or should not be done, for what ever reason, and passed this "law" down through history, without the reasons. This group delusion may be either right or wrong, but until we look at it piece by piece, we will not know. This is religion.
And thinking makes it so. So when we take this "law" apart, what do we find? A lot of bullshit, some wrong, some right. So what do we need to do. Salvage the right from all religion, and abandon the remainder. And thinking makes it so.
But what do I know?