What are so-called evil angels, if their mission is from G-d?

In the spiritual realms that G-d created, there is a side of “holiness,” which means a revelation of G-dliness, and there is a side of “unholiness,” which means a concealment of G-dliness. The relative amount of holiness and unholiness in each spiritual level defines that level. The “highest” realms have much more holiness than unholiness. The “lowest” realms have much more unholiness than holiness. Our physical world is almost entirely unholiness, with just a bit of holiness. This progressive hiding of G-dliness, culminating in this physical world, allows humans to believe that they are independent entities that exist separate and apart from G-d, Who they can’t physically perceive.

When G-d created Adam and Hava (Eve), He “jumped over” all these spiritual levels and revealed Himself to them as they existed in the physical world, in the Garden of Eden. At that time, the holiness in the world was still pure and openly revealed. But when Adam and Hava ate from the forbidden fruit, the power of unholiness in the physical world became openly expressed through their act of free will. G-d did not respond by separating Himself from the physical world, G-d forbid, but rather He concealed Himself behind the screens of the spiritual realms. The sins of the following generations caused G-d to continue concealing Himself.

In association with these two sides of creation, there are angels of holiness, and angels of unholiness. Because of the progressive hiding of G-dliness, the angels of unholiness actually perceive themselves as having something of an existence independent of G-d. That is because G-d gives them their life force reluctantly, as one who has to give something to his enemy would turn his back and throw it over his shoulder. Because the unholy angels think they are somewhat independent, that gives the people of the nations who are under their influence a predisposition to honor and “idolize” the unholy attributes that they represent. The spiritual force (or “angel”) of Amalek is the impure crown for all the other forces on the side of unholiness.

[Note that the Torah says that G-d is at war with “Amalek” in every generation (Exodus 17:16). Originally, this meant the wicked people of that nation, until the nation disappeared. Since then, it means the evil character traits that were embodied in the Amalekites.]

When a physical person by free will chooses not to follow what G-d expects from him or her as it is revealed through His commandments and teachings in the Written and Oral Torah, it is called “evil.” Worse yet, a person may even go a step farther and try to stop someone else from following G-d’s Will. Worst of all, a person may try to stop an entire population from following G-d’s Will.

However, this scheme for the creation, in which G-dliness is concealed from us by the unholy forces, is only temporary. During this temporary time, humans have the ability through their free will to strengthen themselves spiritually and follow G-d’s Will, thus earning reward. We also have the ability to lower ourselves and go against G-d’s Will, thus becoming liable to punishment. We also have the ability to remove ourselves from past sins through repentence (i.e., making a “return” to G-d and following His Will).

In this ongoing process, the creation is actually being continuously refined, so that G-d can once again reveal Himself in the physical world. This will be completed through the coming of the Messiah, at which time the unholiness in the creation will be separated out and suppressed. And not only that, but all the unholy forces will be eliminated, because they will have finished serving their temporary purpose.