God did not dictate them to Moses, although they were attributed to such an act.  They were not meant to be history.  They were national legend, like the Odyssey, Iliad and Aeneid. That does not mean that they don't offer truths, but they must be understood in light of that reality.  Not revelation, but natural law myth making.  And as up for discussion now as ever.  Are you familiar with Kabbalah?  It is an on-going debate on morals in Judaica and is as valid as Torah. Christian scholars are largely ignorant of it, which is why they get so much wrong on these questions.  They are all open.