Bible scholars recognize that there is a typical structure to biblical covenants; this was even seen in covenants made by the ancient Hittites. That is, God communicated to the people in a manner that they, in their culture, could especially understand.
The covenants that were common during the time of ancient Israel had the following parts:
preamble (who God is); historical prologue (past relationship defined); stipulations or laws; blessings and curses; witnesses, special provision or sign of the covenant. Thus, it should be no surprise that God used something similar in communicating to His people back then. He used what they were familiar with.
For example, the whole book of Deuteronomy is written in the form of a covenant, because Moses invites God’s people to enter into a new covenant relationship with their God. It expresses the covenant in the following manner: 1. Preamble (Deut. 1:1-5); 2. Historical prologue (Deut. 1:6-4:43); 3. Stipulations or laws (Deut. 4:44-26:19); 4. Blessings and Curses (Deuteronomy 27:1-30:20); 5. Witnesses (Deut. 30:19); and finally, 6. Special provision (Deut. 31:9-13).
Read Joshua 24:1-33. How is this covenant pattern revealed in that chapter as well?
The same is true with the renewal of the covenant made by Joshua.
First, a preamble is mentioned where God presents Himself as “the LORD, the God of Israel” (Josh. 24:2, NIV). Then follows a long historical prologue where Joshua reminds the people of what God has done for them in the past (Josh. 24:2-15, Josh. 24:23), blessings and curses are mentioned (Josh. 24:19-20), witnesses identified (Josh. 24:22, Josh. 24:27), and special provision stated (Josh. 24:25-26). Here, too, the basic form of a covenant was used to communicate with Israel and show them, not only God’s leading in their past, but what was required of them to uphold their end of the covenant.