When you say law, do you mean legislation or law? Or both. The reason we obey morality is that otherwise we're going to be threatened with punishment. These things emerge from the people have many different plans and purposes. We don't know why they're walking this path and not something else. If you pave the muddy path, then you have what the law should be.
Economist and author Michael Munger of Duke University talks about human wants and desires with EconTalk host Russ Roberts. Human beings have desires about our desires. Can we change what we want? And how should economists and normal human beings think about doing the right thing, what we often call morality? Is acting morally self-interested behavior or is it possible to act selflessly?