The short and direct answers to your questions are:
Evil was created by God from the beginning to enable man to exercise free will.
Knowledge of good and evil is a necessity for man to make the right choices. This is why the Torah teaches us positive and negative commandments.
Longer answer:
Your questions are ones that are common, especially by those influenced by the Christian philosophy that God is all good and that evil belongs in a separate realm (i.e. their Devil's realm). The Orthodox Jewish response to that is, of course, with a question: "Do you believe in an all-powerful God, or do you believe in separate gods for good and evil?" It should not have to be stated that Judaism completely accepts the former and rejects the evil. The view of a "limited God" unable to eliminate evil from the world, was also suggested, unfortunately, by Conservative rabbi Harold Kushner in his book "Why Bad Things Happen to Good People." It is not a legitimate Orthodox perspective according to many critics, notably Rabbi Benjamin Blech, author of "If God is Good, Why is the World So Bad" (Simcha Press 2003).
Starting off with basics. Scripture makes it clear that God created both good and evil. Isaiah 45:7 states: "Who forms light and creates darkness[?] Who makes peace and creates evil[?]; I am the Lord, Who makes all these. Man is also pre-loaded with the inclination to do good, and also the good to do evil. Deut. 30:15-20 (discussed below). Anyone who has raised a 2- or 3-year-old knows that the inclination to do evil rules over the inclination to do good, although even it also shows its face in the toddler, until the child is near the age of bar or bat mitzvah. The child psychologist will tell you that the toddler's constant demands, whining and masterly use of the word "no" serves an important function as the young child learns family and social boundaries that will guide his life. Similarly, the social misfortunes of the beta "tweenage" girl are an essential element in creating a spirit of resilliancy.
For God, the co-existence of good and bad is a practical necessity and an example of a thing on which we lack His perspective. From God's perspective, good and evil are relative terms; "what is good for the butcher is inevitably bad for the cow," one might say. As Rabbi Blech points out, God's purpose for having both good and evil exist equally in this world is to provide us with choice so that we might exercise free will. Deut. 30:15-20 states: "Behold, I have set before you today life and good, and death and evil...I have set before you life and death, the blessing and the curse. You shall choose life...." Rabbi Blech, therefore, argues that from God's perspective, the greatest good is that we choose what the Torah defines as "good" as opposed to those options the Torah defines as "evil." Sometimes, he says, God has to allow evil to rule the day so that man might choose to rebel against it.
Some people try to distinguish Isaiah 45:7 by translating the word רע as "calamaties," thereby avoiding the risk of identifying God as the creator of evil. But they don't understand. But since the word is used broadly to define both the inclination to do evil that dwells in man, as well as natural disasters, we cannot assume it to be one and not the other in the case of either Isaiah or Deuteronomy. Natural disasters and the like do have a tendency to bring out the best in some people, but so do wars, strangely enough. The stories of the Holocaust are filled with examples of amazing acts of charity, preservation of life, and honoring the Name of God, while at the same time that there exists suffering, murder, hoarding and thievery.
With regard to knowing good and evil: One tractates in the Talmud is the book of Avoda Zara -- a tome that debates and discusses various idolatrous religions -- which totals 5 chapters. There, Avoda Zara 14b, Rav Chisda states that in Abraham's day, he compiled his own book of Avoda Zarah that listed all of the customs and rituals of idolaters in his day and his book totaled more than 400 chapters. Why do we have such books? We learn it so that we can recognize idolatry -- an evil in God's eyes. We see from that God wants us to learn what is evil in the world, even if we might be contaminated by the learning to a degree.