And his family also. The LORD is longsuffering, and of great mercy, forgiving iniquity and transgression, and by no means clearing the guilty, visiting the iniquity of the fathers upon the children unto the third and fourth generation. God created Achan for a purpose. God is not willing that the unsaved die without Christ and go to Hell. Yet He must allow man to make his choices.
Every human being is born with a purpose and mission in life.
We are to glorify God and serve him. Yet every human who dies lost has missed fulfilling his life's purpose. Every backslider who commits the sin unto death, dies with an unfulfilled purpose in life. But he did not have to die in the way that he did. God desired that Achan would take his place among his people, that he would occupy his place and give honor to God.