There is law and then there is the law of Moses. The fact that the law of Moses did not exist does not mean there was no law.
Rom 2:14 For when Gentiles, who do not have the law, [of Moses] by nature do what the law [of Moses] requires, they are a law to themselves, even though they do not have the law [of Moses].
A law is basically that system of rules and regulations in the society that one lives by. As such, there is virtually never a situation where there is no law. The only such situation exists when the individual is incapable of recognizing and understanding the existence of the rules and regulations to live by. That occurs in the very young and the mentally incapacitated.
There was and is a law even in such places where Moses has never been heard of, let alone God of the Bible. Even in the realm of the murderous Genghis Kahn there was law. It was not the law of Moses, but it was law.
Thus, Rom 5:12 Therefore, just as sin came into the world through one man, and death through sin, and so death spread to all men because all sinned-- And that because there was law even if it was not the law of Moses.