He wrote there on the stones a copy of the law of Moses, which he wrote, in the presence of the children of Israel.
It is important for God’s people to declare their allegiance to His revealed will publicly among the unbelievers with whom we live (cf. Acts 1:8). This helps them understand why we live as we do, and it brings glory to God when His people then proceed to live upright lives and demonstrate His supernatural power (cf. Matthew 5:16).