Did you catch the four reasons? Reason number one: to exalt Joshua as their leader, as God's choice, just as Moses was. Remember, this is a type of Christ and the miracle was made to impress the Israelites that this was the leader. It was his word that one obeyed, and it was his directions that you took. Just put the name of Jesus in there, and you have your spiritual antitype.
The second reason: to assure Israel that God was with them and would drive out their enemies. This was all the -ites, you know, all the Hittites, Canaanites, Hivites, Perizzites, and all the rest of the -ites. He would do that.
Reason number three: to witness God's might to the world, that He was strong. He was making a witness of His power. And of course, we find out that Rahab the harlot told the men there, the spies that came in, pretty much immediately, Hey, we've heard all the things that have happened since you guys left Egypt. And God had just done a fantastic miracle right on their doorstep, and they were all quaking in their shoes or sandals or whatever they were wearing and did not want to face Israel because they had a God that did awesome works for them.
And the fourth reason: to teach Israel to fear God forever. It is not a one-off thing. He wanted them to be so impressed by what God could do that they would remember this all the days of their life. And this would compel them to do God's will because He had shown, He had proven to them without a doubt that He is the great God of this universe and He has all power and all authority. So who else would you want to obey? So treat Him with great reverence all the days of their lives.
And all of these apply in very similar ways to us in our Christian lives, especially we need to understand these things at the beginning of our conversion. We have to know, be thoroughly convicted and accept and exalt Christ as our Savior, our God, and our King. We are assured of God's promises of divine help to overcome and enter into the Kingdom, that this is not a thing to be done alone, but God will be with us every step of the way.
And through baptism, we publicly declare our allegiance to God. That is why it needs to be done before others, even just a few witnesses, to say, I'm with Him. And it makes a witness, makes a witness of God's power - to think that He could take someone as wicked as you and make you into one of His sons.
And we, in making this decision and covenanting with God, pledge to fear God forever for His awesome work in our behalf.
So these are the same reasons that we do what we do as we start our journey toward the Kingdom of God. Such a miracle of God's calling and leading us to repentance and to baptism gets our Christian lives started with a bang.