There are so many possible reasons why the Bible contains two different versions of the same myth. The first that comes to my mind relates to how the stories were passed down. Before people started publishing books, or even writing things down, all myths were passed on orally. Through oral communication much changes in a myth or story each time its told from one person to the next. These two versions may have prevailed over others and become two very popular. Another reason for the two versions could be related to culture. Different cultures could relate better to different stories, so for the sake of spreading the religion, multiple versions could have been used.
Adam and Eve's punishment was inevitable. At some point, some human or another would have eaten the forbidden fruit and damned all people to a life of pain and suffering that we know today. It can be seen as positive. It gives people a chance to be grateful for the good things in life because they also know the bad. It also gives people a chance to make their own moral decisions without the fate of the whole population on their shoulders.
As many people say, knowledge is power. The Tree of Knowledge may in some way represent power. I think it could mean that the tree gave Adam and Eve the knowledge/power to control their futures. It was also a test from God. Maybe He wanted to see if man had the knowledge to do as God wanted. The fact that it was "lovely to look at" is also a part of the test. This was the first time people were tempted.