Watch Psycho-Pass.
Spoiler, but let Akane Tsunumori explain in two segments relative to what you just mentioned:
https:// hooktube.com/watch?v=Mmbdg_9hS4M
Humans have always detested evil and sought a means to combat it. The law is the process by which we combat evil. It is a sacred construct bearing our desires for a better world.
Major spoilers:
https:// hooktube.com/watch?v=LyQpY6UWs2E
The most condescending and evil thing that can be done is creating a law that is not worthy of being in the above-mentioned sacred place. It forces good men and women to adhere to an arbitrary standard of legal conduct that betrays the ethical goals of society.