Answer: According to the Talmud, God gave them through Adam to Noah, and he passed them on to all humanity. Then a group emerged from this humanity, called Yehudim, which means “aspiring to the Creator.” Therefore, additional commandments were added to them.
Question: Why did the seventh commandment of Noah, which was added after the Flood, oblige creating a fair judicial system?
Answer: Because before the Flood everything developed instinctively, and people did not need to be corrected. And after the Flood, when a huge, terrible egoistic force was revealed, which, as it were, caused the Flood, this additional commandment was introduced.
That is, before the Flood, people were at the elementary animal level, they did not need judicial laws, lawyers, courts. And when the ego grew, then a judicial system to correct interactions and everything else was necessary.
From KabTV’s “Spiritual States” 12/26/19