Evil needn't exist beforehand , just as absence of light is darkness , absence of good is evil or can say if there is weakness in maintaining goodness , the void created is evil.
If the tree in the garden represented a Knowledge of both good and evil, then evil always existed. It exists as an equal opposite of good. This is a natural law.....for everything there is an equal opposite.