The Bible teaches that God creates both good and “evil.” Isaiah 45:7 reads (quoted from the Authorized Version throughout), “I form the light, and create darkness: I make peace, and create evil: I the LORD do all these things.” We are also being told in Jeremiah 6:19, “Hear, O earth: behold, I will bring evil upon this people, even the fruit of their thoughts, because they have not harkened unto my words, nor to my law, but rejected it.” (The New King James Bible translates the Hebrew word for “evil” with “calamity” in both passages. The Hebrew word (“ra”) is the same, though, as used in Genesis 2 to describe the tree of the knowledge of good and evil.)
Originally, God created Lucifer as a perfect being (Ezekiel 28:15), but he was created with the freedom to choose.This meant that Lucifer, by necessity, could and might turn to evil. God, then, created Lucifer with that potential. In the same way, God created man as a free moral agent. He also created the tree of the knowledge of good and evil, in order to give man the opportunity to choose life and to reject evil and death (compare Deuteronomy 30:19). Later, Jesus Christ, who gave up His divine attributes to become a human being like us (John 1:14; Philippians 2:5-8; Hebrews 2:14-18), had to “know” or to learn how to “refuse the evil” (Isaiah 7:14-16; compare Hebrews 4:15). He never sinned, but He had to struggle against sin, and He “learned obedience [or, how to obey in temptation] by the things which He suffered.” (Hebrews 5:6-8).
God created the tree of the knowledge of good and evil, not in order to tempt man to sin (God does not tempt us to sin, James 1:13), but to test man, whether he would obey God or not. When God tests us, He desires that we don’t sin. His tests are giving us opportunity to choose the good and to resist the evil. We read that God let ancient Israel hunger in the desert, to “humble thee, and to prove [or, test] thee, to know what was in thine heart, whether thou wouldest keep his commandments, or no.” (Deuteronomy 8:2).
God wants to know the same about us today. Are we willing to resist sin and the desire to eat from the tree of the knowledge of good and evil, even in the face of adversity? God wants us to continuously eat instead from the tree of life — to drink in His Holy Spirit, which gives us the power and the strength to resist evil and follow the good. The choice, though, is ours.