Legislation organizes society and protects citizens. It determines the rights and responsibilities of individuals and authorities that it applies to.
Ex) A law has little or no value if there is not discipline or enforcement. Legislation provides both.