The future redemption is destined to be more than a simple physical return from exile; it is a profound and exacting process of spiritual purification. This journey serves as a historical mirror to the Exodus from Egypt, where the people travel through the wilderness, yet not everyone merits reaching the final destination. God declares that He will sift and separate the sinners from the rest of the people. This purification will encompass all levels of wrongdoing, ranging from those who rebelled with severe offenses to those whose transgressions were lighter [מלבי״ם].
The primary approach among commentators is that God will indeed extract these sinners from the foreign lands where they lived. However, a question arises: why bring them out of exile if they are ultimately doomed to perish? The answer is that God removes them from their lands of exile so they do not die among their enemies, thereby preventing the foreign nations from gloating over their downfall [רד״ק].
Once removed from exile, their fate is sealed. They will not be permitted to enter the Land of Israel. Instead, these sinners will be led into the wilderness, where they will ultimately perish [רש״י, מצודת דוד]. This sequence of events creates a striking parallel to the original Exodus. Just as God brought the people out of Egypt with great power, forged a covenant with them in the desert, and decreed that the rebellious generation would die on the journey rather than enter the Promised Land, a similar fate awaits during the future redemption. The sinners will leave their exile but will be lost in the wilderness of the nations during their wanderings, never living to see the ultimate salvation in the Land of Israel [מלבי״ם, אברבנאל].
The ultimate purpose of this entire sorting process is recognition. Through God's precise providence and His strict execution of justice, everyone will come to recognize Him and understand that He is completely faithful to fulfill His word [מצודת דוד, אברבנאל].