Throughout history, government has served several fundamental purposes in society. In order to live together peacefully, people decided that it was better to sacrifice some personal freedoms in order to allow a few people to make the decisions for the entire group, putting trust in these people to serve the needs of the people well. Of course, this has looked differently and has worked with vastly varying degrees of success in populations throughout the world's history. However, those with a centralized government do generally find themselves better protected from each other and from outside conflict than those not bound together in solidarity under a central government.
One function that people expect of their governments is a sense of protection. Thus, governments construct physical boundaries when needed. They build and a maintain military presence in their own country and sometimes in other countries. They engage in wars to defend the freedoms of their own citizens. And sometimes, governments of varied counties bane together to form alliances for even greater power. Within a country, a government serves to protect its citizens from each other. In order to live peacefully, people agree to adhere to the rules and laws established by their government. They agree that penalties should be enforced for those who break the rules. Without a central government, people would be free to do and act as they wished, with no sense of consequence. Because humans can be a rather selfish and self-serving species when left unchecked, this might create a sense of insecurity, leaving people unable to reasonably predict expected behaviors and the consequences of not adhering to the group's norms.
In order to achieve a sense of security, people enter a social contract where they knowingly exchange some of their personal freedoms for the benefit of having the protection of laws. Once citizens feel secure in their protection, they are then free to pursue other areas of contentment which would not be possible without the assurances of basic security.