Before man ate from the tree, we are told:
וַיִּהְיוּ שְׁנֵיהֶם עֲרוּמִּים, הָאָדָם וְאִשְׁתּוֹ וְלֹא יִתְבֹּשָׁשׁוּ – They were both naked, the man and his wife, and they weren’t embarrassed. (2:25)
Rashi points out that they were not ashamed because they did not know about modesty – they were literally being “natural”. They could not distinguish between good and evil; and although a degree of knowledge was initially granted to man, ie enabling Adam to name all the animals, nonetheless they were not imbued with the evil inclination until they ate of the tree, after which he knew the difference between good and evil.
The purpose of creation is to grow close to Hashem by resisting the natural tendencies and inclinations that prevent us from fulfilling our duties, thereby overcoming them. This being the case, what function would creation have served if there were no inclination for evil?
R’ Chaim Volozhin explains that Adam had all faculties, particularly free will, instilled within him before the original sin, to enable to him to do as he saw fit. What he didn’t have though, was an internal urge to sin or do evil. The snake/Satan figure, the personification and embodiment of evil, was an external being to Adam, and had to physically manifest itself as the snake to ensnare Adam and Eve – unlike today, where this battle is an internal battle, choice, decision.
The original quote from Rashi implies this: that the Evil Inclination only became an innate thing in man once he consumed the fruit and it became part of him.
The Pardes Yosef adds that the Gemara concludes that the Tree of Knowledge of good and evil was an Esrog tree – a פרי עץ הדר – the final letters of the words are י – צ – ר – יצר! When the פרי עץ הדר entered their bodies, the יצר did too!