The entire moral architecture of the Torah fits into one verse. Targum Pseudo-Jonathan on (Genesis 2:17) renders it sharply: "of the tree of whose fruit they who eat become wise to know between good and evil, thou shalt not eat: for in the day that thou eatest thou wilt be guilty of death."
Two things are true at once. The fruit really would make Adam wise. And eating it would really kill him. The Targumist does not soften either edge. Knowledge and mortality are packaged together. A creature that can tell good from evil is a creature that can die.
That is the bargain of being human. The prohibition is not a test for its own sake — it is a warning that what waits inside the tree is the whole tragic dignity of moral life. Adam could have lived forever in innocence. He chose the knowledge. The rest of Torah is the story of what humanity does with that choice.