The question: “Why is there such a thing as evil?” is really much too big a question for any one answer to explain. There are so many different kinds of evil – physical (pain, sickness); emotional (sorrow, fear, anger, resentment); moral and spiritual (bigotry, selfishness, crime, hate, sin) – and each of them, and each example of them, has different causes.
Some evils are simply due to the fact that we are finite creatures living in a still unfinished, evolving world. The limitations on our understanding and abilities make us suffer. For example, the diseases we haven’t yet learned to conquer, and the injustices we haven’t yet learned (or firmly enough decided) to prevent. Those are challenges we haven’t yet surmounted. But as humanity (both the individual human being and the human race as a whole) grows and becomes wiser, such evils can be diminished, even abolished. (Can be but might not be –because we are free to do things or not do things, and evils can’t be abolished until people are willing to do what is necessary to abolish them.)
Our love and knowledge are still very incomplete (“now we see in a glass dimly”), but maybe that isn’t the fault of love or knowledge (in short, God’s fault). Love and knowledge must be discovered, appreciated, understood, and applied before happiness can be complete.
Maybe that’s why we’re here: to learn to do that.