The gift of free will enables man to choose God.
God is God and as such possesses purview over all things. He has full rights to determine what is ultimately good and evil.
The first command at the Garden of Eden provided a graphic potential for sin. If the tree of the knowledge of good and evil was violated, it meant man's free exercise of autonomous declaration of self-authored morality. It takes away the irrevocable truth of God's sole prerogative.
The certainty of death flows from the audacity of such human arrogance.