Apostasy (turning away from the true God) leads to destruction.
Because God is holy, Joshua could speak with confidence about God’s promises and about the good land God had given the people. God does not change in his holy character, even when his people change.
The rebellion of God’s people does not harm God’s holiness. However, rebellion does bring destruction on those who choose it.