If God is good, why does evil exist?

A pessimistic observer might interpret the answer to the first question in ‘The Spirits’ Book’, given by the guides of humanity to Allan Kardec, which reads: “God is the supreme intelligence, the first cause of all things”, and conclude that God is also the creator of evil. He might argue that evil predominates in humanity, evidenced by constant wars, terrorist extremism, chaos, hunger, corruption, social neglect and recurrent disease, among other evils. Such a perception would make him imagine a God who takes pleasure in human suffering.
The dilemma of the existence of evil has been a recurring topic in philosophy. Its coexistence with pain has led to materialistic views that, by prioritising pleasure and individualism, have led many sceptics to question the existence of a benevolent God. These simplistic views have fuelled myths of evil entities in conflict with the Creator.
As stated in ‘’The Genesis‘’, chapter III, there are two interpretations: an evil entity on the level of God or an inferior one. The former proposes an eternal conflict between two forces, creating disorder in the universal balance. This belief has perpetuated figures such as Satan and fostered fear-based religions. The second theory presents this evil being as God's creation, which contradicts the divine attribute of infinite goodness.
Beyond these interpretations, spiritist doctrine classifies evil into physical and moral. The former includes natural calamities, independent of human will. If we understand that God is just and benevolent, we can see evil as part of our evolutionary process, reminiscent of our primitive stages. Psychiatrist Carl Gustav Jung refers to this as our "shadow", and in "The Spirit Book", pride and selfishness are mentioned as impediments to moral progress.
Recognising that divine laws are inscribed in our consciousness, we can aspire to follow and honour them. Ignoring them leads to pain, which are actually evolutionary lessons. It is our free will that determines our path. Divine Law does not propagate evil, but employs it as a corrective mechanism.
The aspiration for moral growth transcends religions; it is an innate human desire. Personal and collective harmony anticipates a world where evil is a lesson of the past and benevolent spirits reincarnate to promote good as the norm.
God, in His infinite goodness, seeks only the good. The human being harbours the root of evil, but also possesses free will and the guidance of Divine Laws, enabling him to overcome it if he so chooses.