When the Israelites conquered Jericho God commanded them not to take anything from the city for themselves. It was all to be given to God. But a man named Achan disobeyed this command.
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.
As a result of his disobedience the Israelites were defeated when they made their first attempt to conquer Ai. They were unable to conquer it until Achan’s sin had been brought to light and punished.
So Joshua sent messengers, and they ran to the tent; and behold, it was hidden in his tent with the silver underneath. And they took them out of the tent and brought them to Joshua and to all the people of Israel. And they laid them down before the LORD.
And Joshua and all Israel with him took Achan the son of Zerah, and the silver and the cloak and the bar of gold, and his sons and daughters and his oxen and donkeys and sheep and his tent and all that he had. And they brought them up to the Valley of Achor. And Joshua said, “Why did you bring trouble on us? The LORD brings trouble on you today.”
And all Israel stoned him with stones. They burned them with fire and stoned them with stones. And they raised over him a great heap of stones that remains to this day. Then the LORD turned from his burning anger. Therefore, to this day the name of that place is called the Valley of Achor.
But God didn’t place the same restrictions on taking property from Ai that he had with Jericho. Joshua 8:26 says,
But Joshua did not draw back his hand with which he stretched out the javelin until he had devoted all the inhabitants of Ai to destruction. Only the livestock and the spoil of that city Israel took as their plunder, according to the word of the LORD that he commanded Joshua.
If Achan had obeyed after the conquest of Jericho he would have had the opportunity to take all he wanted from Ai without being guilty of sin. God would have given him what he wanted if he had just waited until the proper time.
The first sin recorded in the Bible was the same kind of sin as Achan’s. God told Adam and Eve that they weren’t to eat the fruit of the tree of life. Here is Eve’s first response to the serpent’s temptation.
The woman saw that the tree was good for food, and that it was a delight to the eyes, and that the tree was to be desired to make one wise, she took of its fruit and ate.
Here is the description of the other trees God has created in the garden.
Out of the ground the LORD God made to spring up every tree that is pleasant to the sight and good for food.
Since all of the trees were good for food and pleasant to look at the only reason Eve could have had for eating the fruit of the forbidden tree would be to obtain wisdom. But since the Bible contains many commands for us to seek wisdom it is unlikely that Eve’s desire for wisdom was itself sinful. The sin lay in disobeying God in order to obtain it.
If Achan had obeyed God he would eventually have gotten what he wanted without becoming guilty of sin. It is possible that if Adam and Eve had obeyed God he would have given them the opportunity to obtain the wisdom they wanted in a way that wouldn’t have brought sin and death into the world.