Think of it like a growing community of people.
In the beginning, there are not many rules, because there is no need for them. Everything is going according to plan, and everyone is getting along. However, the village grows into a town. More people equals more rules, otherwise things become chaotic and out of control. Time passes, and the new changes to social life flourish under an interconnecting web of rules that are enforced by the entire populace. Each person plays their role in keeping the peace and each person plays their role into bettering the town.
Eventually, the town grows into a city. There are so many people now that the rules just keeping adding up and adding up. At this point, legislation is constantly expanding to meet the demands of such an overflowing community of people. Law and order evolve and evolve.
Basically, social rules are the glue that keeps everyone together and everything functioning as normal. They are created through long processes that occur within a growing community. A few people are easy to manage and therefore do not take many rules, but as more and more people gather in the same place, this leads to arguments and fighting and just general chaos. Rules are put in place to keep everyone safe and happy.
Really, I could go on and on, but hopefully this answers your question.