Genesis 2:5 states: "Now no tree of the field was yet on the earth, neither did any herb of the field yet grow, because the Lord God had not brought rain upon the earth, and there was no man to work the soil." The stage has been set, and then creation begins. This implies that, according to the story, man's purpose is to till the land. Therefore, this is not punishment, but man finally fulfilling his purpose in creation. Note that the first thing they notice when they gain knowledge is their own nudity. They now have a sexual awareness. They are then taken from a childlike, edenic existence into the real world of adult responsibilities. It seems more a rite of passage, if you will - from childhood, to adolescence (knowledge and budding sexuality), into adulthood (labor and childbirth).
Side note, I specifically chose Genesis 2 because according to the documentary hypothesis this is the older creation myth. Genesis 2 is assumed to have been from around 950 BCE and Genesis 1 is estimated to be from around 400 BCE.