The fundamental justification for government, its raison d’etre and source of legitimacy, is solving collective action problems. Why else would people band together, trading off a degree of autonomy, but in order to solve problems for the common good?
There is another explanation: exploiting others in order to concentrate power and control. To the extent that rulers fail to solve collection action problems, they are not governing but exploiting.
Take, for example, building infrastructure, which requires specific costs to be borne, but bears generalized benefits. No one individually has enough incentive to assume the great costs of building what will benefit everyone. Government’s power to tax and spend solves this free-rider problem by spreading the costs and coordinating the investment.
Or rulers concentrating their power can build infrastructure by exploiting underclass labor, providing access only to some, and reaping profits for the ruler class.
For another example, consider the tragedy of the commons. A river is a common resource, but if anyone can use it however they wish, pollution and depletion will destroy its value. Government can solve this collective action problem, too, by regulating how we use common resources, restricting pollution or depletion that is all too expedient for producers to avoid without being required to by a coordinating body who ensures that all producers bear equally the cost of not polluting or depleting.
Or rulers can allow whomever, maybe just some some, to pollute and deplete for the sake of narrow expedience, at the expense of all.
The point of drawing these alternatives is to inform the question of legitimacy. Governance is solving collective action problems for the common good. Exploitation is taking advantage of these problems for profit and power.