For the entire time of Exile is the period of refinement and removing evil.
The time of Exile is when we remove evil and sin, and thereby remove death from the world.
This refinement process is accomplished through the level of Chochmah, for “With Chochmah-Wisdom everything becomes refined,” and it separates the evil from the good.
Chochma-Wisdom has the insight to distinguish between what is good and what is bad; what is holy and what is unholy; what is forbidden and what is permitted. The advantage of Chochma-Wisdom over Bina-Understanding is that in Bina there can be many different ways to understand something, and therefore, different possible conclusions in each case, whether something is forbidden or permitted, and therefore, whether it can be used for holiness or not (similar to how there can be different opinions in the Gemara).
However, in Chochma there is the insight to “see” the correct conclusion come to a definite judgement regarding the status of each thing (similar to the final halachic decision, as rendered in the Shulchan Aruch).
Therefore, specifically in Chochma the complete power to differentiate between holy and unholy resides, and therefore, Chochma has the ability to separate holiness from unholiness.
Therefore, Chochmah is called Din-Judgement. This concept (that Chochma is connected to severity and judgement) is unlike what the earlier Kabbalists understood, that Chochmah is entirely Kindness, since it is the source of Kindness. However, the Chayat, one of the later Kabbalists, proposed that it also contains Din-Judgement. The Arizal agreed with him and praised him for this explanation.
He said that this concept corresponds to how it is explained in the Zohar, in the section titled “the Idra” (Zohar vol. III, 128b): “The hidden Chochmah rests and settles in its place, like fine wine settles on its dregs.”
Wine contains dregs, which become separated from the wine over time, producing pure wine at the top of the barrel. This separation of the dregs happens through the wine being “calm and settled” in one place, allowing the dregs to sink to the bottom. So too, in Chochma, which is “calm and settled,” insight is able to separate the “dregs” of unholiness from the “wine” of holiness.
The “Chayat” is Rabbi Yehuda Chayat, who wrote a commentary on the Sefer Maareches HaElokus. He lived around the time of the Spanish inquisition in the late1400’s. The Sefer Maareches HaElokus is an ancient Kabbala Sefer widely used in the earlier generations.
The "Idra” (lit. “gathering”) is a section of the Zohar when Rabbi Shimon Bar Yochai gathered his students and colleagues for a special study session where each person said a new discourse of Kabbalah connected to a different aspect of the spiritual levels of Atzilus and higher. These discourses are brought in the Zohar of Parshas Naso. (This is also sometimes called “Idra Rabbah,” the greater “Idra” to distinguish it from “Idra Zuta,” the smaller Idra, which was when Rabbi Shimon Bar Yochai gathered his students and colleagues on the day he passed away to share new insights in Kabbalah. Since that collection of teachings is shorter than the collection in Parshas Naso, it is referred to as “Idra Zuta,” the smaller “Idra.”)
[We find in Pirkei Avos (4:20) that refined wisdom is compared to aged wine, and less refined wisdom to new wine. When someone spends many years learning and reviewing a topic, he gains insight into the topic in a way of “seeing” the concepts, Chochma, as opposed to one who learned it recently, in which case even if he understands it, he doesn’t “see” the ideas instinctively, he “hears” the ideas in Bina. One who has spent more time on a concept has already filtered out the “dregs” of improper understanding, whereas someone less familiar with the concepts still needs to remove those “dregs” of misconception).
This ability to refine contained in Chochma is needed since there are things requiring refinement, to have the evil removed from them, and this is accomplished through Gevurah-Severity, as it is contained in Chochmah.
The power of refinement in Chochma is referred to as “Gevura of Chochma.”
And on this the verse states, (Tehillim 94:12) “Fortunate is the man to whom Yud-Hei (Hashem) sends suffering.” Even suffering, which is for the purpose of removing evil, come from the level of Yud-Hei, the first two letters of the Divine name.
As is known, that suffering is for the purpose of separating out the evil, since Kelipah is likened to a leech, which sucks blood and immediately dies. This is the meaning of what is written, (Mishlei 30:15) “And the ‘leech’ has two children,” referring to two types of Kelipa, which the verse compares to leeches.
This is also the idea of the “goat that is sent off,” i.e., the goat sent to be pushed off of a cliff on Yom Kippur as atonement for our sins, as well as the idea that (Bereishis 32:4,14) “Yaakov sent... a gift to his brother Eisav... two hundred male goats.” The reason for sending off the goats is that by giving a portion of life to the kelipa, he separates it from his own domain.
Imagine there were two brothers, one righteous and one wicked. Their father passed away, leaving an inheritance that is jointly owned by both of them. In order for the righteous brother to remove any claim on his portion of the inheritance from his brother, he must first give his wicked brother his portion of the inheritance. Similarly, kelipa has a “claim” on us since we sin during the year, or are at least somewhat connected to unholiness in some way. In order to remove kelipa’s “claim” on us, we give him a goat on Yom Kippur in place of our own connection to unholiness. (This only works if the person also does Teshuva and repents of his sins).
This shows that every Jew has a mixture of unholiness in himself that needs to be separated out, using Chochma. For example, the Torah, which is from Chochma, teaches how to perform the Yom Kippur service of sending the goat.
This is what must be done once Adam already tasted from the Tree of Knowledge and became mixed with evil. Then the process of refining is necessary until the evil is separated out by removing all sparks of holiness within the Kelipah.
All of this refinement process is by way of Chochmah, for “Through Chochmah it becomes refined,” since it contains within itself also Gevuros-Severities, in order to allow for “Yud-Hei sends him suffering,” and as is written, “Just as a man rebukes his son, so too, Hashem rebukes you.”
The letters of Yud and Hei correspond to Chochma (Yud) and Bina (Hei). The fact that suffering comes from these two levels is because they contain the Gevura-Severity of Chochma, which is what affects purification and refinement, and suffering is for the purpose of purification from sin (or physicality).
Which is not the case regarding the level of Keser-Divine Will, which is above Chochmah, for Keser is pure Rachamim-Mercy, and on that level “Darkness is equivalent to light.” (Tehillim 139:12)
Since, at that level, spiritual darkness does not have any effect, there is also no need for the removal of that darkness. This is why purification comes from Chochma, since it is the first level that is affected by unholiness, and therefore sees the need to remove unholiness.