But of the tree of the knowledge of good and evil you shall not eat, for in the day that you eat of it you shall surely die. Genesis 2:17
Adam and Eve lived happily in the Garden, but they did not know that such happiness would not last for long, for there was an enemy who stood close and only awaited the opportunity to put his plan into motion. When we read the Word, we realize that he was able to act because Eve gave him the legal right when she broke the laws established by God. Had she remained faithful, the enemy would have been able to do nothing, as great as his intentions were.
God wants to protect us; that is why He sets limits and lets us know, for us to be careful and not fall into the trap. He talks to us through his Word; He teaches us that, if we observe all his laws, the fence will not be broken and we will be safe from all the machinations of the enemy.
The fence can be easily broken, with just a lie or a bad thought. That is why we must be attentive, so we immediately reject everything that can make us fail, and let us not be enticed by any of his tradings.