ספר הזהר, Achrei Mot Achrei Mot · יט
Zohar 278
ב
Rabbi Shimeon began with the verse: "and he took Shimeon from them, and bound him in front of them" (Genesis 42:24). And what did Yosef see that he showed partiality in Shimeon more than the brothers? Rather, Yosef said: in every place Shimeon (and Levi) are, there is an opening for strict judgment, and at that moment when I went from my father to my brothers, Shimeon opened the strict judgment [against me], as it is written "a man said to his brother here comes that dreamer, come now etc" (Genesis 37:19-20), and before, in Shechem, "and the sons of Yaakov, Shimeon and Levi, each man took" (Genesis 34:25) - all was in strict judgment. It is better to select this one, and not to stir up fights among all the tribes.
ג
It was taught: what did Shimeon see that he connected to Levi more than the others? Behold, Reuven was his closest brother, but Shimeon saw and knew that Levi was from the side of strict judgment, and Shimeon being from the side of harsh judgment connected to him more. He said: let us join with one another and destroy the world. What did the Holy One of Blessing? God took Levi to God's part, and said, from here onward Shimeon will sit tied with ropes, alone.