Deuteronomy, Leviticus, large parts of Numbers and the latter chapters of Exodus are not just a lists of rules and regulations. Deuteronomy, in particular, documents the thoughts of Elohim, illustrated by how often Messiah Yeshua and the apostles quote from it. By studying these commandments, statutes and judgments — at times difficult to understand — we can see a small glimpse of how God thinks, not in the past tense but in the present tense.
This story has a story within a story. It begins with the death of Nahash, the king of Ammon (1st Samuel 11). David was touched by Nahash’s death and sent a condolence party. The prince of Ammon treated this party poorly and that insult was the beginning of the end of Ammon’s power.