Locke explains that, in the State of Nature, enforcement of basic notions of law is left in the hands of everyone individually:
"And that all men may be restrained from invading others rights, and from doing hurt to one another, and the law of nature be observed, which willeth the peace and preservation of all mankind, the execution of the law of nature is, in that state, put into every man's hands, whereby every one has a right to punish the transgressors of that law to such a degree, as may hinder its violation: for the law of nature would, as all other laws that concern men in this world 'be in vain, if there were no body that in the state of nature had a power to execute that law, and thereby preserve the innocent and restrain offenders. And if any one in the state of nature may punish another for any evil he has done, every one may do so: for in that state of perfect equality, where naturally there is no superiority or jurisdiction of one over another, what any may do in prosecution of that law, every one must needs have a right to do."
Locke also understands that this State of Nature is chaotic and unreliable:
"" To this strange doctrine, viz. That in the state of nature every one has the executive power of the law of nature, I doubt not but it will be objected, that it is unreasonable for men to be judges in their own cases, that self- love will make men partial to themselves and their friends: and on the other side, that ill nature, passion and revenge will carry them too far in punishing others; and hence nothing but confusion and disorder will follow; I easily grant, that civil government is the proper remedy for the inconveniencies of the state of nature, which must certainly be great, where men may be judges in their own case, since it is easy to be imagined, that he who was so unjust as to do his brother an injury, will scarce be so just as to condemn himself for it"
Locke further explains the need for political society and the dangers inherent in nullifying it:
Man being born, as has been proved, with a title to perfect freedom, and an uncontrolled enjoyment of all the rights and privileges of the law of nature, equally with any other man or number of men in the world, hath by nature a power, not only to preserve his property, that is, his life, liberty and estate, against the injuries and attempts of other men; but to judge of, and punish the breaches of that law in others, as he is persuaded the offence deserves, even with death itself, in crimes where the heinousness of the fact, in his opinion, requires it. But because no political society can be, nor subsist, without having in itself the power to preserve the property, and in order thereunto, punish the offences of all those of that society; there, and there only is political society, where every one of the members hath quitted this natural power, resigned it up into the hands of the community in all cases that exclude him not from appealing for protection to the law established by it. And thus all private judgment of every particular member being excluded, the community comes to be umpire, by settled standing rules, indifferent, and the same to all parties; and by men having authority from the community, for the execution of those rules, decides all the differences that may happen between any members of that society concerning any matter of right; and punishes those offences which any member hath committed against the society, with such penalties as the law has established: whereby it is easy to discern, who are, and who are not, in political society together. Those who are united into one body, and have a common established law and judicature to appeal to, with authority to decide controversies between them, and punish offenders, are in civil society one with another: but those who have no such common appeal, I mean on earth, are still in the state of nature, each being, where there is no other, judge for himself, and executioner; which is, as I have before shewed it, the perfect state of nature.
Administering a fair and just system for the redress of grievances is the most basic function of government. That system must be fair and just, and it must be widely perceived as such. Seizing private property under contrived or false pretenses, then denying justice in the courts, is the surest means for reverting to the State of Nature.