From the way the souls are rooted in the Partzufim of Atzilut... For just as there are two orders of government – the concealed order rooted in the Unknown Head and the revealed order of Atzilut – so the souls are rooted in both of them. Initially they were rooted in the hidden level, and afterwards they enter and take root in the revealed order of Atzilut.

...there appears to be no valid reason for this... This was why Moses had difficulty with the suffering of the righteous, and moreover the Holy One, blessed be He, answered him: “I will be gracious to whom I will be gracious” (Exodus 33:19) – even though he may not be worthy (see Berachot 7a). For according to the root of the soul in Atzilut they did not deserve this lot. But the truth is that the root of this mystery lies in this hidden connection.