This question is one that was the basis of much philosophical thinking, especially in the Age of Enlightenment. Two of the major thinkers on this idea were Rousseau and Locke (see links). To both of them, the major advantage of making laws was that making laws was part of a process of protecting the rights of people.
Without laws, there is no society. Without laws, all we have is anarchy. We have what Thomas Hobbes referred to as the "war of each against all." In such a situation, there is chaos with every person preying on every other person.
It is in order to get out of this situation that we have laws. By having laws, we set up norms of behavior and we create a government that has the power to enforce these norms. By doing so, we give up some of our freedom to that government. In return, however, we are protected from the chaos and anarchy that would result if there were no laws.