Sin is trespassing or going over a line. It is very difficult to not go beyond the limitations God has placed on human behavior and thought. God could program man to never cross the lines. But He could not have reciprocal love for Him. There is only faith and love drivers if we have free will. Yes, God created a world with healthy living and excess. He designed a world with things forbidden so that out faith and love for Him can be evidenced by choosing to obey.
God bless you.