The core idea of consecration is to separate from things that are unclean or common, anything that would contaminate one’s relationship with a perfect God. The people and not just the priests were to consecrate themselves. This would have included extensive ritual preparation, probably similar to that seen at the foot of Mount Sinai (Exodus 19:5–10; Numbers 11:18).1
The reason why this was necessary was so that the people would be prepared for seeing the miracle that God was about to do, that they might respond rightly to it. They needed to be prepared so that they could understand what was happening.2
5 Then Joshua said to the people, “Consecrate yourselves, for tomorrow the LORD will do wonders among you.”