You haven't read enough incoherent laws, I see.
https://www.sevenslegal.com/criminal-attorney/strange-state-...
I'm sure you can make a coherent argument for "It is illegal to cry on the witness stand", but not a reasonable one for actual humans. You're in a formal setting being asked to recall potentially traumatic incidents. No decent person is going to punish an emotional reaction to such actions. Then there are laws simply made to serve corporate interests (the "zoot suit", for instance within that article. Jaywalking is another famous one).
There's a reason an AI Judge is practically a tired trope in the cyberpunk genre. We don't want robots controlling human behavior.