One chapter covers the basic forces regulating behavior:
Physics - The world and our understanding of it place bounds on what can and cannot be done.
Money and Markets - The cost of things place bounds on what can and cannot be done.
Both of these prevent behavior, as in taking behavior off the table no matter how compelling it may otherwise be.
The other two, norms and laws lack this property, instead act post fact.
Laws - Describe acceptable and unacceptable behaviour, and carry consequences, remedies for unacceptable behavior.
Physics takes driving above some speeds impossible. Speed bumps, etc...
Speed limits do not actually prevent anything, only impose costs, by way of example.
Norms - Work like laws, only are largely enforced socially.
There is a lot more in the book.
My point here is leaning on law to manage behavior is not particularly effective. Getting more of the better behavior more of the time is systemic. Requires action on all fronts.
You seem to be referring to ideal or better/more effective. I was referring to what is.
There is of course a gap there, and any changes to move ‘is’ to ‘better’ or ‘ideal’ requires a lot of buy in and messy negotiation from people who aren’t likely hanging out on Hackernews debating the topic.
Law does not operate in a vacuum.
And, I am saying it is more effective to give all the forces regulating behavior consideration.
Which is not to say that we do in fact write laws that codify those ideals, hence the words "supposed to" in my prior comment.
I can probably dig up a citation tomorrow when I hope have a little more free time, but not making any promises either, sorry
Additionally, the only places I see explicitly saying laws are coming from a place of moral authority are places with Sharia law (literally - sharia means ‘the clear well trodden path to water’ and it’s the codifying of traditions the population considers to work). Pretty much every law in the US that uses morals as it’s justification has been thrown out by the US Supreme Court.
If ‘we all’ are not actually in agreement (always the case) on what is morally right, then what happens?
Is executing a slightly underdeveloped person (80 iq) for murdering several people morally right? Is NOT executing that person morally right?
You could poll the population and get a large chunk of people agreeing with both of those stances very strongly.
Is asset forfeiture morally ok? What if the person is a certain color and speaks with the accent of a certain country to the south of the US?
You can get a large portion of the population to disagree with the first one, and strongly agree with the second.
A law is codifying a stance (writing it down in as unambiguous a way as possible) that can be passed by representatives without them all getting fired/hanged by angry constituents and enforced willingly by a large law enforcement group without getting overridden by a higher power.
Part of the whole not getting fired/hanged part is making sure it can’t be enforced arbitrarily against people their constituents wouldn’t like it being enforced against, and can be against people they do.
It’s a messy business with huge implications for everyone.
Laws from what I’ve seen are to codify expected behavior so it isn’t arbitrary. The tone and nature of them is up to the legislator.