30 Then Joshua built an altar unto the LORD God of Israel in mount Ebal, 31 As Moses the servant of the LORD commanded the children of Israel, as it is written in the book of the law of Moses, an altar of whole stones, over which no man hath lift up any iron: and they offered thereon burnt offerings unto the LORD, and sacrificed peace offerings. 32 And he wrote there upon the stones a copy of the law of Moses, which he wrote in the presence of the children of Israel. 33 And all Israel, and their elders, and officers, and their judges, stood on this side the ark and on that side before the priests the Levites, which bare the ark of the covenant of the LORD, as well the stranger, as he that was born among them; half of them over against mount Gerizim, and half of them over against mount Ebal; as Moses the servant of the LORD had commanded before, that they should bless the people of Israel. 34 And afterward he read all the words of the law, the blessings and cursings, according to all that is written in the book of the law. 35 There was not a word of all that Moses commanded, which Joshua read not before all the congregation of Israel, with the women, and the little ones, and the strangers that were conversant among them.
To encourage realization of the fact that in the midst of battles, of marching toward the goal, of the discipline of a people, God wills that His people also worship and learn of Him.