Then you were taught well.
We know that God cannot abide the presence of sin, yes? And yet God walked with Adam in the Garden prior to the fall.
The Fall was a real thing and God pronounced a curse on all creation due too it.
In noodling on the fall I came to the conclusion that Adam and Eve were innocent but mutable. The Scriptures talk about elect Angels as well as people. Therefore I posit that there were non-elect angels. Elect meaning protected by God from "changing" to something other than perfect. Something other than God honoring.
Now...all THAT said...Lucifer was in the Garden. The tree of Good and Evil was in the Garden. God done pointed out the tree and said "don't".
I suspect an inside job.
Why? Why why why...Because God wished to be known, correctly, as both Just and Justifier. Correct knowledge of Himself is more important to God than your favorite Aunt Becky. Sorry...but it's true.
So all us creatures really should get with the program and appreciate that He stepped down out of love to save some of us.