The so-called ethics-law divide is pervasive in most cultures nowadays. Not all unethical acts are punishable by the state or defined in its positive law, and occasionally societies formally ban certain behavior but tacitly permit it as long as it is kept quiet and nobody is harmed. Most states also include so-called regulatory offenses or "victimless" crimes such as failure to register motor vehicles or other similar acts that are often not considered to transgress ethics. This really makes me wonder whether there has ever been a society where there is no ethics-law divide, that is, where ethics and law are exactly the same thing. In other words, in a society with merged ethics and law, any act that is legal is automatically ethical, and vice versa, and any unlawful act is, ipso facto, unethical, and vice versa.
Are there, or have there been any societies where ethics and law do or did encompass the exact same principles, behaviors, intents, etc.?
One idea I had was theocracies, but even religious systems of law tend not to fully punish all bad acts or failures to perform correct acts. For example, the Islamic concept of makruh defines certain acts that are strongly discouraged or even considered disgusting (and thus might be considered unethical for followers to commit), but nonetheless are not considered sins and carry no punishment. Roman Catholic Canon Law distinguishes the so-called external and internal forums. A priest holding heretical beliefs but not sharing them with others is subject only to conscience and personal penance (internal forum) rather than a formal trial for heresy before a canon law judge (external forum). Only when the priest begins formally preaching his heretical beliefs in public does it enter into the jurisdiction of the external forum and the possibility of official action by church authorities under its statutes.
In response to comments, this question is not about theocracies. I mentioned them because theocracies, even when "harsh" compared to Western standards, tend not to address all possible religious or ethical transgressions through the law and courts.