It's not because they ate a piece of fruit.
It's because they disobeyed a direct order. It's because they were prideful enough to demand the knowledge for know;edge's sake.
The act was merely a symptom.
But...being all-knowing...when He made us didn’t He know that we would have a curious nature that along with free-will might make us disobey Him? It’s like when you have a child...you know there are going to be times when they will disobey you but do you, upon the very first infraction, condemn them and their children forever more to such severe penalty??? Why have that one particular tree with “forbidden fruit” there for them to access in the first place? Why allow a serpent the power to deceive them? I’m a Christian and I love the Lord but I do wonder about Him. It’s almost like it was a game when he made us humans.