Actually, sin is to be avoided because God said so alone. We find out that it makes sense later, but that doesn't come first.
Man has an infinite capability to self justify and rationalize, but wanting to follow what God says in the Holy Bible, and praying about it tends to lead to more wisdom later. But putting our rationality before what the Lord says is putting something before God - which is the type of idols in the heart one of the passages in the original post is talking about.
Isaiah 7:16 For before the child shall know to refuse the evil, and choose the good, the land that thou abhorrest shall be forsaken of both her kings.
Proverbs 22:6 Train up a child in the way he should go: and when he is old, he will not depart from it.
And for the support of this Declaration, with a firm reliance on the protection of Divine Providence, we mutually pledge to each other our lives, our fortunes and our sacred honor.
Want DP delivered to your inbox daily? Subscribe here: