Hobbes described the state of nature in the middle of Leviathan: "The relationship between people is the relationship between wolves" and "the war of all against all". Based on the fear of the natural state, Leviathan (country) came into being. People transfer power to the sovereign. Locke believes that the right to transfer is not all rights, and the purpose of transferring rights is to ensure the free exercise of rights. In other words, the purpose of accepting the state's restrictions on rights is to protect the exercise of rights. According to this logic, the state makes laws to prohibit private relief and restrict people's freedom by law, in order to protect people's rights from infringement and maintain a state of peace and security. Therefore, there is no need to regulate some behaviors that do not threaten peace and security or hinder the free exercise of others by law.
For example, the contractual relationship in the civil law is regulated by law, while the kindness is not regulated by law; For example, marriage accepts the rights and obligations endowed by law, while love is not regulated by law.
based on the lag and limitation of the statute law, the development of society will produce new relations, and all social relations laws can be adjusted, which is simply impossible to achieve. Considering the relationship between law and freedom, all human behaviors, relationships between people, between people and nature, and between people and society are regulated by law, which is the extreme restriction of public power on private autonomy and an extremely unsatisfactory society.
to sum up, the law does not regulate all social relations.
To add, regarding the point that "morality is not regulated by law" mentioned upstairs, I think it is necessary to discuss the relationship between morality and law. Not all morals are not regulated by law. If we think that morality is not regulated by law, we should recognize the "separation of morality and law" and walk into the positivist road of "evil law is also law". Some morals are regulated by law, and the stronger evidence is the principle of "public order and good customs" in the civil law and the principles of "honesty and credit" as the emperor's clause. The establishment of these principles is the expression of morality entering the legal field. "Law is the minimum morality", which is the famous saying of the new natural law school, Pailang Fuller.