When God says, "destroy everything lest I plague you with bad stuff" (this is not an exact quote), you had better do as he asks. Unless of course your name is Achan, in which case you will totally get away with hiding something from an omnipotent being.
Oh wait. No you won't.
Achan, an Israelite soldier, is not a smart man. After the destruction of Jericho, he decides to keep some loot for himself, completely disobeying God's law. Through deductive reasoning, we can determine this is not going to turn out well for him (7:1-9).
At first glance, it appears that Achan will actually get away with his ploy. However, when the Israelites lose a battle at the city of Ai, it becomes evident someone hasn't been playing by the rules. Through the aid of God, Joshua discovers the culprit of their defeat. As punishment, all of Achan's possessions are burned as he and his family are stoned to death. They are all buried in the valley of Achor—which means "trouble" in Hebrew. Bummer.
Achan represents the first real problem and setback the Israelites face in Canaan.