I still think Tracie Harris has the best take on this:
You either have a God who sends child rapists to rape children or you have a God who simply watches it and says, “When you’re done, I’m going to punish you.” If I could stop a person from raping a child, I would. That’s the difference between me and your God.
The topic of the ten commandments is much more interesting when adding in consideration of the Shapira Scroll, which has a compelling modern case for authenticity thanks to Idan Dershowitz.
That version of the ten commandments also contains:
Which is further expanded during the “blessed are” section:
There are similar sentiments in Leviticus 19, which also apply to foreigners (as in Deuteronomy 10:19).
We tend to interpret the sayings as referring to literal physical neighbors within a society, as opposed to regarding neighboring societies, largely based on the considerable counter-example tales of conquering neighbors.
There’s a certain irony to Joshua carrying around the Ark saying “don’t covet and steal your neighbors” while he steals everything from the neighboring cities after murdering them all.
But this is one of the many places where the Bible is anachronistic. There’s zero evidence the early Israelites were conquering Philistines or Canaanites. In fact, the emerging archeological picture was that they were cohabitating in mixed cities with both.
So when we look at the apparent contrast between messages of “love your neighbors and strangers among you” and “don’t covet or steal their shit” with the anachronistic tales of coveting neighbors and killing and stealing from them, it may simply be that we’re receiving a heavily edited text within which many changes have occurred under regimes that came to power after disregarding such guidance which leads to conflicting messaging.
For an analysis of a similar development of contradiction regarding homosexuality prohibitions in Leviticus, check out this oped from Idan Dershowitz in the NYT.