Roman law had no particular interest in legislating morality at the beginning. That was the situation until sometime in the third century BCE, possibly around 286 BCE, when a Tribune named Aquilia got the Lex Aquilia passed via a plebiscite (basically a referendum). We know of this law because it survives in a text from late antiquity called Justinian’s Digest.