Too complex a question for a short reply but there are a plethora of philosophical perspectives on the topic. 1) Evil is necessary in order to distinguish between it and Good(i.e you would not appreciate a good deed if evil did not exist). 2) Evil is a necessary component in a Free World Universe(free choice is the pinnacle of the human condition and taking that away would mean damaging the very fabric of existence).
In the catholic bible it says that in the beginning of time God gave angels free will and some of them did not listen to God and became fallen angels or other wise known as devils and since God did not like them, they started evil
For a very simple reason,as we are human, without the existence of curse we don't understand what is the blessing for us.If there will be all time happiness in life then nothing will be new and then people will get bore from this life and never have so much value of the word 'happiness'.