~Hello There!~
I'm pretty sure it was to avoid eating the fruit of the tree of knowledge. They ate it after the temptation of a serpent which represented the devil. After disobeying, God kicked them both out of the Garden of Eden.
Hope This Helps You!
Good Luck :)
Have A Great Day ^_^
- Hannah ❤