Human societies throughout time have defined their own rules and couched those rules as having been written by that society's god or gods. But they were invented by humans as all rules are. Every society has the right to define its own rules, no matter how arbitrary they may seem to others.
"Of all the strange crimes that humanity has legislated out of nothing, blasphemy is the most amazing - with obscenity and indecent exposure fighting it out for second and third place."
"Sin lies only in hurting other people unnecessarily. All other sins are invented nonsense. (Hurting yourself is not sinful--just stupid.)"
"One man's religion is another man's belly laugh."
Human beings do make their own rules. What is to say that they have rules they follow. And if these rules lead to bad results, then presumably they ought to change them. So we must then ask how should they make rules that get rules that enough men will follow to get a good outcome. Or do we even use the word should?