The Eden myth belongs to a type. The closest analog that people might be expected to be familiar with is the myth of Prometheus & Pandora from Hesiod, but there are others from around the world. These myths express the feeling that people have that things used to be easier, and that as people have progressed or evolved, that evolution has come with a price. That does not mean that the evolution was a mistake, just that it had to be balanced with new hardships (or so the myths suggest) so that humans would not overtake the heavenly gods in power.
In the Eden myth the humans eat of a magical fruit that grants them discernment that most creatures in the garden don't have (excepting the snake, apparently). It's compared to the knowledge that the gods have, which is why they say that the man and woman "have become like us." They then express their fear that the humans will eat of the tree of life and become immortal, eliminating the line between human and divine, so they saddle the humans with difficulties to keep them in their place (e.g. having to work the land in order to eat, difficulty in childbirth, never being able to conspire with the snake or his kind again).
In the Greek myth Prometheus tricks Zeus so that humans get the better part of each sacrifice, so Zeus tries to balance that benefit by removing fire from the earthly realm, for fear that with it humans will have too easy a time and will challenge the status of the gods. Prometheus steals fire back for humans, allowing them to develop technology, etc., so in order to balance that benefit the gods create the first woman and give her a jar full of hardships to unleash on the world, so that people will have to work the land to eat, they will get sick and die, men will have to marry and be bedeviled by women in order to reproduce, etc.
In both cases the humans are advanced beyond their animal state by the acquisition of something that previously only belonged to the gods, and in both cases the gods felt the need to make life harder for humans to compensate for that benefit. Whether cursing mortals in this way was fair was completely beside the point when those myths were set to writing. They're not meant to express a belief in cosmic justice; they're meant to express the human experience that life is hard, yet unlike other animals we can imagine a world in which it isn't, and that causes us to suffer even more, though we have godlike faculties that other creatures do not.