Why are governments necessary? What are the essential purposes of government?
Governments are needed for two main reasons. First, we need them to protect our rights. Second, we need them to provide certain economic things that could not be provided by the private sector.
The first of these purposes of government is the one that more people think about. This is something that is included in the Declaration of Independence. The Declaration tells us that people have the innate rights to “life, liberty, and the pursuit of happiness.” It tells us that the government exists in order to protect these rights. If we did not have government, our society would be a free for all. Anyone who had enough power could simply take away our property. They could enslave us. They could kill us. We need a government to protect us from having our human rights violated in these ways.
The second of these purposes is economic. There are various things that we need that the private sector would not provide. Policing and national defense fall under this category. So do things like education, roads in rural areas, and electricity to rural areas. Private companies would not provide these things to everyone because it would be hard to make people pay for them or it would not be profitable to provide them. But we need these things and, therefore, we need governments.
For these reasons, governments are necessary in the modern world.
Governments are necessary once people live together in communities larger than extended families and thus evolved in forms that had many of the essentials of modern governments during the neolithic period. They exist to handle necessary forms of cooperative endeavor and to resolve conflicts in a way that limits disruption.
On the most basic level, even a community of a few hundred people needs some degree of formal cooperative organization. If one family dumps raw sewage upstream of the drinking water of other families, that causes problems. Many issues like irrigation, fire fighting, maintaining streets or roads, building aqueducts, and banding together for mutual aid in self defense or dealing with natural disasters all require a government, in the sense of some form of agreed upon leadership with well-defined types of authority. Private property also requires some authoritative record keeping mechanism and a mechanism for dispute resolution.
Governments also act to finance projects for the common good by some system of taxation. Many elements of infrastructure such as water mains, sewers, electricity, roads, etc. benefit everyone and there needs to be some system in which all people are required to contribute to these common goods to some degree (based upon their means).
Essentially, governments are a formal mechanism for agreeing upon shared rules, adjudicating disputes, and engaging in cooperative actions among communities.