Evil, biblically, means one who does harm to people. An “evil” spirit is not one that is in opposition to God, except to do harm to humans.
Why does evil exist? First, because God placed humans in charge over the earth. God gave a sliver of his sovereignty to humanity, and humanity chose to use that sovereignty for selfish, destructive motives.
However, most evil is simply ignorance– not thinking about what harm we cause others–, judgment–punishing others for harms we think they have done– or systemic– participating in a system which benefits some by harming others. Satan, as an evil force, is the head of a system of judgment.
We do evil to God by separating ourselves from Him by disobeying His will or by doing actions of hatred toward Him. We cannot truly harm God, but we can harm our relationship with Him and we can harm those who are made in His image. If we harm our relationship with God, that leads us to more evil, for all good things come from God.