He did this so that all the peoples of the earth might know that the hand of the LORD is powerful and so that you might always fear the LORD your God Joshua 4:24
Lord promised Joshua to give Canaan, but now they have Jordan river in front of it and its shores was overflowing with water.
Lord asked the priest to take the ark and put their feet into the water, immediately waters piled on one side and the other side drained off and people walked through dry land.
How to React
We might also be facing Jordan river (problems) hindering us to possess Canaan (promise), but just get ready and trust Lord will guide and dry up Jordan.
Reason to Permit
Why did the Lord permit this situation. The word above says it was for all people to know the hand of the Lord is powerful and is with us, and we will know his mightily works and always fear God by seeing the awesome work of the Lord. So let us not lose heart, remember Jesus said when Lazarus was sick, this is not for death by for the Glory of God. Our situation is for the Glory of Almighty.