After the lengthy account of the distribution of the parcels of land to various tribes, we are told that that “nothing failed of all the good things that the LORD had spoken to the House of Israel—everything came about” (Josh. 21:45; cf. 23:14, The Hebrew Bible).
The book closes with Joshua calling the tribes of Israel to stand before God in a covenant renewal ceremony. Joshua retells the history of Israel, though he starts not with Abraham as we might expect, but he goes even further back to Abraham’s father Terah:
Your forefathers dwelled across the Euphrates [or, "the River"] long ago—Terah father of Abraham and father of Nahor, and they served other gods. And I took your father Abraham from across the Euphrates and led him to the land of Canaan… (Josh. 24:3-4)
Why start with Terah? Joshua is retelling the story of Israel as a story about leaving a world of idols behind and marching forward faithfully into a new world of true worship. This summary of Abraham's life highlights the similarities between himself and his descendants: God took him out from Ur of the Chaldees, brought him across the River, and led him to the land of Canaan. It may also be significant that Abraham did not come to Canaan until his father Terah had died "halfway" there in Haran, even as this generation did not enter the land until their fathers had died off.
Joshua also tells us that, just as Terah had worshipped idols before his exodus from Ur, Egypt had served idols in Egypt (v. 14). Israel very likely brought its slavery upon itself by this idolatry, just as they do repeatedly in the book of Judges, and again in the book of Kings. Even after the Lord struck Egypt with plagues and brought them out, we discover in the wilderness that their hearts are still back in Egypt.
But Abraham made it across the River, and Israel made it across the Red Sea and the River Jordan. The time has come for the sons of Abraham to make a decisive break with the past, as Joshua exhorts them:
fear the LORD and serve Him in wholeness and truth, and put away the gods that your forefathers served across the Euphrates and in Egypt, and serve the LORD (Josh. 24:14, The Hebrew Bible)
Israel has been ransomed by the blood of the Passover lamb from the futile ways inherited from their forefathers.
After Israel vows to Joshua that they will serve the Lord, we are told that “Joshua wrote these things in the book of God’s teaching” (v. 25). Robert Alter suggests that this covenant written by Joshua might have formed an appendix to Deuteronomy or to the Pentateuch as a whole. With that, Joshua draws a line under Israel’s dark past.