Behind every legal concept is a moral obligation that applies to how we treat each other in general, not just in the court of law.  For instance, "cruel and unusual punishment" may be a legal concept but it is based on the moral principle of proportionality: that a punishment should fit the offense and not exceed what is needed to correct the behavior being punished. So if a public reprimand is sufficient to stop an inappropriate behavior, it would be cruel and unusual punishment to ruin a person's career for such behavior.

Due process is another legal concept that reflects a general moral obligation. If a person is accused of some violation of a social norm, they have the right to defend themselves, especially when it comes to serious accusations with potentially serious repercussions, regardless of whether any law has been broken. For instance, an employee accused of sexual misconduct should be provided:

An impartial arbitrator evaluating the claim of misconduct

The right to know and have a written record of the opposing evidence.

The right to present evidence, including the right to call witnesses.

The right to confront and cross-examine adverse witnesses, including the accuser.

The opportunity to be represented by counsel.

A decision based exclusively on the evidence presented.

A record of the evidence presented.

A written finding of fact and reasons for the arbitrator's decision.

Anything less would be a travesty of justice - and, as we know, "justice" is a concept that extends well beyond the courtroom.