Why does God allow evil? This is a really complicated topic and many born again Christians don't agree on the answer. I will do my best to explain what I beleive the Bible teaches about this. It is a multi-part answer. The first has to do with why there is evil to begin with. The second is how do we become evil and how do we become good.
First I want to define what the word "perfect" means. It actually has two meanings. The first meaning refers to something that is without fault or defect. I could be halfway through building a house and say that it is "perfect", meaning that it is exactly according to the plans and that there have been no mistakes made up to this point. The second meaning has to do with "completeness". Once that house is completed I could stand back and "now that it is finished, it is perfect." It no longer needs any more work. It is complete.
When God created the world and Adam and Eve, they were perfect in the first sense of the word. They were without defect or sin, but creation was not yet "complete". We know that they were without defect, because God tells us this multiple times in Genesis 1 when the Bible says "And God saw that it was good". At the same time, we know that they were not "complete". For starters, they did not yet know the difference between good and evil and they were naked. The biggest clue however that things were not complete comes from God's direction to Adam in Genesis 1 and 2.
Genesis 1:28 - God blessed them and said to them, “Be fruitful and increase in number; fill the earth and subdue it. Rule over the fish in the sea and the birds in the sky and over every living creature that moves on the ground.”
Genesis 2:15 - The Lord God took the man and put him in the Garden of Eden to work it and take care of it.
Genesis 2:19-20 - Now the Lord God had formed out of the ground all the wild animals and all the birds in the sky. He brought them to the man to see what he would name them; and whatever the man called each living creature, that was its name. 20 So the man gave names to all the livestock, the birds in the sky and all the wild animals. But for Adam no suitable helper was found.
Remember that God created Adam in the image of God which meant that Adam represented God to the rest of creation. Adam had God's authority over the world, and here we see that in action. The animals belonged to God because God had created them. Since they belonged to God, God had the right to name them. However God has Adam name the creatures in God's place. The first thing that God tells Adam to do is to rule over the earth and to finish his work. Part of this is for Adam to care for the garden and God has Adam name all the animals for him.
So why is this important? We need to understand that Adam and Eve sinned without a sin nature and that Adam was responsiblie for all of creation. These two things are key to understanding why God allows for evil, why we sin today, why the Holy Spirit of God needs to dwell in us and why we won't sin in heaven. Adam and Eve were created perfect as in without defect, but they were not perfect as in "complete". With the Holy Spirit of God dwelling is us (as born again Christians) and with new resurrection bodies (without Adam's sin nature) we will be perfect in both meanings of the word. We will be without defect and we will be complete. This is why we will not sin in heaven after the resurrection. We will have the nature of the Holy Spirit of God dwelling in us and we will not be inclined to sin in the first place. As I say on my page about free will This is part of the significance of being born again (besides the whole eternal life thing). As born again Christians we are a new creation in Christ. The Spirit of God comes to dwell in us and imparts his sovereign will into us. While we still temorarily have the burden of our physical sinful bodies, we now (as born again Christians) also have the Holy Spirit of God helping us by living in us and giving us his nature.
Why we have sin in the world:
God knew that if he created self aware creatures that were not himself (did not have the nature of God), that they would at some point in time offend him or put their will above his will. See my page on Can God Sin for more explanation of this. The only way that God could have self aware creatures that were not also God but also had the nature of God (inability to sin) would be for him to put his Spirit into them. This is exactly what he does through the Plan of Salvation (Jesus' birth, life, death and resurrection).
Imputation is another key word that we need to understand. Basically we are given something that we don't deserve or earn, but someone else has earned it in our place. It can be a good thing or a bad thing that is imputed to us. We as humans, espesially modern day humans that are so dead-set on our own "free-will" and our own idea of "fairness", have a hard time with this concept. Let me give you a couple of examples that may help. Think of this as being on a sports team. Imagine that you are a player on a football team, but you sat on the bench the entire game and your team won. You would still be on the winning team. The "win" would be imputed to you even though you did nothing to earn it. The same would go if you did play in the game and you played extraordinary well, but your team lost. Reguardless of how well you personally played, you are on the loosing team. The loss would be imputed to you.
Another way to think of this is with the example of a military general and his troops. The general is responsible for his troops. If the general makes a bad descision during war, his troops are the ones that die. The individual soldiers did not make the bad decision. The general made the bad decision but the soldiers are the ones that die and suffer the consequences. In a similar way, we suffer the consequences of Adam's sin. Adam was the single man who represented all mankind. While all humans are responsible to care for this world, Adam was the individual who was personally responsible for all that God had encharged man kind with. He was the our general, our representative before God. This is why the original sin is called Adam's sin and not Eve's sin. Even though Eve was the first person to sin, it was Adam's responsibility to make sure no person ate from that tree. Because Adam sinned and he represented all man kind and he was in charge of all creation, we too are all now imputed Adam's guilt. We have inherited Adam's sin nature. The sins of humanity most certainly curse the rest of creation.
Genesis 3:17 - To Adam he said, “Because you listened to your wife and ate fruit from the tree about which I commanded you, ‘You must not eat from it,’ “Cursed is the ground because of you; through painful toil you will eat food from it all the days of your life. 18 It will produce thorns and thistles for you, and you will eat the plants of the field.
Genesis 4:11 - Now you are under a curse and driven from the ground, which opened its mouth to receive your brother’s blood from your hand. 12 When you work the ground, it will no longer yield its crops for you. You will be a restless wanderer on the earth.”
All of man kind and all of creation now suffer sin and evil due to Adam's sin, and Adam sinned because he did not have the nature of God (the only being who can not sin). We see this principle and we see our hope in 1 Corinthians 15:20-22.
1 Corinthians 15:20-22 - But Christ has indeed been raised from the dead, the firstfruits of those who have fallen asleep. 21 For since death came through a man, the resurrection of the dead comes also through a man. 22 For as in Adam all die, so in Christ all will be made alive.
So through Adam we were imputed sin and evil, but through the birth, life, death and ressurection of Jesus Christ we are imputed righteousness and eternal life with God. At the second coming of Jesus, sin and death will be defeted for ever. We will no longer suffer through it or because of it. We will be complete and without fault, having the Holy Spirit of God dwelling in us to guide us in all righteousness.