I have just finished reading a very interesting series of essays that tries to explain the discrepancies between books Shemot (Exodus) and Bamidbar (Numbers) on the one hand and Devarim (Deuteronomy) on the other hand. The issue is, that Devarim recounts in some places the same stories that have already been told beforehand in Shemot-Bamidbar – but slightly different.
In the series Rethinking Orthodoxy and Biblical Criticism, Professor Joshua Berman explains his theory that the Tora follows the form of a treaty between sovereign and vassal kings as was common in the ancient near east at around 1300 BCE. He explains that we find in the Tora many elements typical for such a treaty: a historical prologue, followed by the conditions of the treaty, witnesses, blessings and curses.
The repetitions in Devarim would be explained by it being a follow-up treaty, where the elements of the previous treaty are repeated. But they are not repeated verbatim. The conditions may change (read: variations on halachot between Shemot-Bamidbar and Devarim, although the series does not really go into this point). And also the historical prologue is not intended to be a faithful recounting of what actually happened, but a diplomatic instrument, a way of setting the tone of the relationship. It reflects what has happened in the meantime and the differences are not errors, different traditions or anything, they are meant to be analyzed in terms of good/bad diplomatic relations.
The first treaty of G-d with the exodus-generation as written down in Shemot-Bamidbar was more positive. The second treaty was with the new generation born in the desert, after lots of things have happened that have influenced the relationship negatively. So the discrepancies we see are all painting Israel in a more critical light.
I am no expert in biblical criticism and do not know the alternative theories very well. I do not even know the plain text of the Tora well enough. To me the treaty-theory makes sense. Still, I am left with lots of questions. Where do Bereshit (Genesis) and Vayikra (Levitikus) enter the picture? Is it normal that the "salvation" element, i.e., the story of the exodus, that precedes the historical prologue, is not in the renewal treaty? Why the change of narratological tone between the accounts if both are treaties in the same format? Still, I recommend reading the whole series and I am looking forward to the series on halachot differences between the two parts.