Every moral code ever devised has been the work of men; some just cited a god as its author in order to lend it authority and foster compliance. In fact, no god ever actually stopped anyone from behaving badly; society, with its laws, police, judges and jails perform that role in the real world. Yes, some do fear the wrath and judgment of an angry god and seek to curb those acts and behaviors that they've been taught "their" god disfavors; but there we see superstition in its most primitive form, fear of the invisible, at work - not a god or the power of a god, but simply the rumor of a god, coupled with the human imagination.