There are many verse that seem to show that God allows certain things, but that isn't really the case.
Many times these are causical laws ( IF someone does this...) and other times they are shown to be God "accomodating" the Israeli's ( making the best of a bad situation).
"Is God a Moral Monster" by Paul Copan tackles this issues and more and it's an interesting read.
Of course, Jesus does make it clear that MOSES was accomodating of the hebrews "hard heartedness".