To consider this question, you have to define exactly what law is. My definition of law is rules to live by. The two main functions of the law are to maintain social cohesion and to keep up with social progress.
Social cohesion is the bonding of people into a group with extensive shared beliefs and consequent actions.
The law functions to maintain and establish social cohesion by: reinforcing values; establishing patterns of acceptable conduct; providing dispute settling mechanisms and processes; providing law-making and law reform bodies and processes.
Social cohesion preserves the principle value of a given society by: implementing laws that outline standards of acceptable conduct; by providing institutions and processes that cater for the making of laws and resolution of disputes in a peaceful fashion; and by providing agencies that promote law reform and change.
In our society, our legal system permits people great freedom, and regulates this freedom by setting limits. If these limits are breached, you have broken the law. People become used to acting within limits- behaving in acceptable patterns.
Our legal system and law also provide courts, tribunals, commissions, boards, registrars, mediators, arbitrators, and their role is to help settle disputes. Our law making and law reform bodies in Australia are Government Departments, Parliaments and Judges in courts.
Advances in technology, advances in marketplace and changes in societies attitudes need to be provided for in our legal system. This comes under Social Progress. Social Progress is achieved by having a system of laws that allows for peaceful and orderly progression from one generation to the next.
Without these two main functions, (Social Progress and Social Cohesion), our laws would be old and useless. As long as our society changes, our laws need to be upgraded to provide for the changes, making sure that it provides for the making of laws and settling disputes and to uphold societies values, beliefs and ethics.