One of the reasons for God’s deliverance of Israel from Egypt was that he might dwell among his people and be their God (see Exodus 29:45–46; Leviticus 26:11–13; Numbers 35:34).
The sin of Achan jeopardized the Lord’s presence among his people (Joshua 7:12). Israel must be clean and holy if they are to enjoy communion with God (see Leviticus). If they persevere in sin, they will not only be kicked out of the land of Canaan, but they will also not enjoy the Lord’s blessing (Deuteronomy 28:15–68).
Because the Lord desires to dwell among his people and be their God (Genesis 17:7), he clearly reveals to Joshua and Israel why he is angry and what must be done to rectify the situation. As such, the anger of the Lord against Israel is actually a testimony of his grace. The covenant curse that came upon Israel was meant to help them realize that they had broken the terms of the Mosaic covenant, and so repent.
1 But the people of Israel broke faith in regard to the devoted things, for Achan the son of Carmi, son of Zabdi, son of Zerah, of the tribe of Judah, took some of the devoted things. And the anger of the LORD burned against the people of Israel.