There is a contrast with Rahab and "all that she had" being saved (6:23), where Achan "and all that he had" (7:24) being destroyed. (The same happens to the men with Korah in Numbers 16:32 and to Daniel's enemies in Daniel 6:24.) Like with the Canaanites Israel kills, we must assume that God does this knowing they are sinful and without faith in Him. Rahab demonstrates that faith (James 2:25), so his saved with her household. Achan takes forbidden fruit like Adam, and so taints his whole community.
Why are Achan's children killed, too? (No wife mentioned, curiously). I assume they aided and abetted in the concealment. You can't dig a hole big enough to hide that much silver and gold in such a small tent without your several children noticing.
Beyond this, I think we underestimate the serious impact Adam's sin had on the human race - worse than the physical death of Achan's children was the death of alienation from God that Adam brought on all his children. The death of Achan's children, even if they were ignorant of Achan's sin, is a picture of that imputation of original sin, in a way. Can God destroy "innocent" people like this, just to make a negative example for others? See Romans 9:22-23.
We are all His, are without excuse in our sin (Romans 1:20; 2:1), and God will not condemn the guiltless, or those who trust Him.