Many of the norms and habits, customs, manners emerge spontaneously. I would argue that those that are effective stay and those who are not may have trouble enduring carry on. The fundamental human social problem is the design or maintenance of institutions that make self interested individual action,. not inconsistent with the welfare of the collective.
Civilization and the pleasantness of everyday life depend on unwritten rules. Early in the 20th century, an English mathematician and government official, Lord Moulton, described complying with these rules as "obedience to the unenforceable"--the area of personal choice that falls between illegal acts and complete freedom. Listen as economist Michael Munger talks with EconTalk's Russ Roberts about the power and challenge of the unenforceable.