Social contract theory is the idea that any given society has a set of conventions and trade-offs which it demands or requires, in order for participation in it to be possible and for the society to continue to exist. In particular, it recognises that authority exists inasmuch as the members of society cede power to the authority (voluntarily and on average — ideally, though not necessarily, as a carefully considered decision).
If we recognise that there are usually "social norms" which lie outside of the purview of law, but which are still well within the domain of moral judgement (and even occasionally vigilante action), we may recognise that social contract theory extends beyond the formal trappings of society, and into the culture of the society. There are behaviours and rights which are informally recognised, and informally defended; and there are duties which are informally demanded, and informally coerced. Much of politics and public discussion about both politics and philosophy represents a continuous negotiation of this social contract, and discussion about to what extent it should be formalised by being written into law.
As noted in the IEP link above, notions of this sort may be traced back as far as Socrates, who while imprisoned by a formal process, chooses not to escape because of a recognition of the values he holds in conjunction with the operation of society, despite having willing would-be conspirators. The first recognised modern advocate of social contract theory in European philosophy is Thomas Hobbes, who held that the King of England (in a time of civil war, and in a time when the so-called Divine Right of Kings was in question) did not have any absolute right to rule, but had his position of authority on the basis of the willingness of society to allow him to govern and ideally to wield executive power to maintain as stable and well-organised government as possible. In this sense Hobbes was not concerned with the execuition of the law, but rather the basis of law, and how society gives rise to the formal programmes that it has through informal shared values.