Law
 
See: MinciuSodas/investigatoryQuestion
How does law give rise to law?

Andrius: One question I keep returning to: How does law give rise to law? I noticed that in working with databases: every solution brings up new problems. So if you have a key (or password) to a door, then you have to worry about what to do if you lose the key, and what if somebody finds the key, and where do you keep a second copy, and how do you make a copy, and how do you know which copy is primary, and it goes on and on. So the answer I think is that there is no perfect solution, but instead for each set of problems there is an optimal solution. The optimal solution is where you spend, say, roughly half of your energy on the general case, and roughly half of your energy on special cases.

I started to study this while doing part-time work summarizing regulations. I decided to study the core of the law of Moses, it is actually quite short. Exodus 20-23, about the length of the Sermon on the Mount. I noticed that the punishments (sometimes harsh, sometimes lenient, sometimes absent) seemed to be chosen to maximally dissuade. If they are too harsh or too lenient, then they aren't taken seriously. So for adultery you put somebody's life at stake, but for gossip you just say don't do it and punishment apparently won't have any effect. That's what seems to be the logic.