Joshua 7:12-13
The Israelites are unable to stand before their enemies; they retreat because they have become subject to annihilation. I will no longer be with you, unless you destroy what has contaminated you. Get up! Ritually consecrate the people and tell them this: ‘Ritually consecrate yourselves for tomorrow, because the Lord God of Israel says, “You are contaminated, O Israel! You will not be able to stand before your enemies until you remove what is contaminating you.”
Israel had been utterly destroying the other cities inhabiting the promised land, and God had given instruction not to take things from plunder. A man named Achan had hidden things he stole...he was stealing from and lying to God and the Israelites. Israel loses God's favor because of this sin. Hear this, sin hurts God, this is true no matter what your beliefs. As a Christian, unconfessed sin and/or an unrepentant heart about sin will negatively impact the intimacy of your relationship with God. Trust that Jesus is enough, and lay every sin at His feet. Tell Him, he already knows.