1Psalm 107:17-18
Fools, because of their rebellious way, and because of their sins were afflicted. They detested all kinds of food, and they drew near to the gates of death.
If we turn away from God and become rebellious to His teaching, we will sin. Sin removes us from the protection of God an opens the door to affliction. If we purpose in our hearts that a future with God has more value than any temptation we will not sin. When value God in our lives above all else a sin idol doesn’t stand a chance.