Genesis is a folk tale designed not to be believed but, as in the manner of many folk tales, to give an entertaining explanation for something to which there is no answer.
Some 9 year old Bronze Age peasant child once asked, "Why do people die?" and the story began. So popular was it that it was told and re-told and entered into folk-history.
The puzzle is why the person explaining didn't say, "That's what happens when you get too old and things wear out." as was known and said in other cultures. Perhaps they did... a lot of the patriarchs die when they get old, and because of age.
Perhaps the question was, "Why do people have to die?" which requires a nebulous answer given the state of biological knowledge at the time. Anything here will do, but as there was a heaven, then Genesis seems to explain the reason.
In the folk tale of Cinderella, Cinderella dies temporarily and is resurrected by a kiss (In the original story the Prince shagged her) so be grateful that the fundies aren't going around praising 7 dwarves.