IMO it had everything to do with the tree, because this tree and its apples could tempt only humans - that’s why it was placed on the garden and why the humans were warned to avoid it.
One of the most striking things about this story is how Adam and Eve totally identify themselves with their instinctive wish to eat the apple, like small kids before a cake: kids grab it and swallow it without thinking about anything else, because it looks good, it tastes good, it’s food for kids! When Adam and Eve
actually saw the tree, they instantly forgot what God and the snake had told them; none of them has a moment to reflect: “wait, what if the snake tells us lies? God told us that we would die if we eat!” or “let’s eat it against God’s will, don’t you want us to be like God?”.
There are other characters in the Bible who commit crimes or various other trespassings and then “wake up” and say: what have I done?? There’s Jesus who asks the Father to forgive people “for they don’t know what they are doing”. But in these cases, their sins don’t have to do with something destined for humans: God didn’t destine humans to kill and torture each other, BUT He did destine them to know good from evil. That’s why the story of Adam and Eve can be interpreted in various ways.
One can say that in fact God wanted to give them the knowledge of good and evil, but later, as a reward for their obedience, an attestation of maturity. Another can say that God couldn’t really ask them to abstain from the tree
as a moral choice, as long as they didn’t have the means to distinguish good from evil (they had only the elementary fear of death - “when you eat from it you will certainly die”). That’s why some Christian thinkers - see St Irenaeus - concluded that the first humans weren’t created perfect, like St Augustine says, but they were like small children who had to grow up. So the succession isn’t Original perfection - Fall - Living a life of condemnation - Jesus comes to atone for man’s sin by His death; rather, the succession is Original imperfection - Costly mistake - Growing up as becoming closer to God - Jesus becomes a man to unite man with God.
Further, others can say it’s impossible to understand why God put the temptation in the way of these humans, knowing that they would be naturally and irresistibly attracted by the tree and knowing that they in fact lacked a real discernment - remember, they were only told that eating apple = death and only after eating they realized they were naked (shame as a moral reaction).
That’s why some choose to turn the story on its head to make it more logical: there are Gnostics who imagine that the snake was Jesus who came to liberate humanity from the tyranny of an imperfect god and to show them the way towards the real divine knowledge destined for them by the Father. Meanwhile, others leave the story as it is and just reflect on the actual lack (or narrowness) of choices which defines human existence. Kafka has a cynical version of this tragic story about lack of choices, with the frightening, insurmountable distance between God and man, a man who can’t understand God regardless of all his efforts, obedience, prayers and hope:
kafka-online.info/before-the-law.html