The Israelites had been forbidden to claim any of the spoils of the city (6:17-19). But one man thought he could be an exception. The Hebrew word translated "a disgraceful thing" in verse 15 "denotes a blatant and senseless disregard for God's will" (Nelson Study Bible, note on 7:15-16). Sometimes one man's sin can adversely affect others who apparently had nothing to do with it. Thankfully, only 36 out of a few thousand men were lost (verses 3-5). Though tragic, the repercussions could have been much worseas God declared the nation as a whole "doomed to destruction" (verse 12) until the sin was removed from its midst.
The King James Study Bible notes: "Achan is referred to as 'Achar, the troubler of Israel, who transgressed in the accursed thing' (1 Chr. 2:7). He was stoned to death for violating the 'ban' during the conquest of Jericho (v. 1). Achan stole 200 shekels of silver, a Babylonian garment, and a wedge of gold weighing 50 shekels and hid them in the earthen floor of his tent (v. 21). The sin of Achan was imputed to the whole nation (vv. 11, 12), and thus they were soundly defeated in the battle of Ai (vv. 4, 5). Israel learned the hard way that what one person does could affect the well-being of the whole nation. He was buried in the valley of Achor ('trouble,' v. 26). Achor is used in a figurative sense in Isaiah 65:10 and Hosea 2:15 to describe the messianic age or the time of restoration that would result for the nation of Israel only after they passed through trouble." Indeed, like in this example, the Great Tribulation will come upon Israel in the end time not because every single individual is in complete and total rebellion against God. Rather, because of the terrible sins of somein fact, of manythat are not rooted out of Israel, suffering will come on all.
Ironically, if Achan had only waited until the very next battle with Ai, he would have been allowed to take spoil for himself (8:2). But his greed got the better of himand brought about his downfall.