The Eden story is an allegory. It wasn't an apple they were forbidden to eat; God knew what would happen if Adam took Eve's cherry and warned him not to go there.
That's when the snake came into the picture and Adam was unable to resist it's allure. That's the problem with men and their snakes, we often think with them instead of our brains.
The snake wasn't really a devil; it was more of an appendage.