Disclaimer, Question is mostly intended for those who have studied Kabbalah and or extensive midrash. Also, I know duality only exists in illusion. I know even Egypt and Pharaoh are ultimately part of Hashem. But to gain understanding I have to ask questions about one aspect at a time within human limitations. Just please don’t think it means I don’t understand that All is Hashem! Now my question..
Cabalistically speaking, Egypt = darkness, exile, and the Klippoth. Therefore Pharaoh, being the ruler of Egypt, equals the ruler of darkness, the ruler of the Klippoth, representative of Samael, essentially.
I know Hashem only created this darkness so we would have free choice, but what He wants from us is to choose the light, and use the light to overcome the darkness and become free of it.
So at first glance, one would think since Joseph wanted to free his people from the darkness, he would ally with an angel of light. But instead, he allied with the ruler of that very darkness, Pharaoh (essentially Samael, presiding angel over the Klippoth). My question is, within the context of the overall goal of light overcoming darkness and light freeing itself from darkness, why did Joseph ally with the ruler of the darkness, and not the ruler of the light? Why did Joseph ally with the angel of the Klippoth, and not an angel of the holy side of the Tree, for instance maybe Michael or whichever one would have been best for the situation?