The future leadership of the Jewish people was to belong to Judah. True, Joseph's descendents had their day, but it is Judah, through his star descendent King David, who learned the permanent kingship over the tribes of Israel. This is surprising, considering Joseph's meteoric rise to power and his status high above that of his brothers.
Rabbi Meir Simcha of Divinsk suggests that Joseph had not intended to reveal his identity to the brothers at the point that he did. His second dream as a youth had the sun, the moon, and the 11 stars bowing to him. The sun and moon symbolized his parents, and even though the brothers had already bowed, his father and mother (represented by Bilhah, his deceased mother's maidservant) have not yet done so. Joseph wanted the dream to be fulfilled in its entirety.
Rabbi Meir Simcha continues that Judah's speech, in which he so eloquently described his father's emotional turmoil and how he himself was ready to take Benjamin's place as Joseph's captive, forced Joseph to change his approach. There were other people in the room, Egyptians, in front of whom Joseph felt that continuing his harsh act towards the brothers would desecrate the name of God. Joseph was a Hebrew, and for him to behave cruelly in front of the Egyptians might be a bad example.
Why was Joseph so insistent on making the dreams come true himself? Why did they have to come through completely? And why was his concern for what the Egyptians might think such a significant factor that he changed his mind?
The answer lies in why Jacob showed favoritism for Joseph in the first place. A parent wants their children to carry their legacy forward. Isaac had preferred Esav because he felt that Esav would better make his way in the world than the innocent Jacob. Jacob himself was determined to not repeat his father's error, and chose which son to favor with great care. (The rabbis are critical of this, warning that a father should never show any favoritism to one over others of his children.)
Jacob's prime concern was that his son be a person of complete truth. Truth is not partial, it is universal. A man who lives according to truth cannot be silent when falsehood abounds. Such a person will commit to fixing the world, and that is exactly what Jacob wanted his son to do. Just as Esav had given his father Isaac gifts (the meats that he hunted) which gave Isaac the impression that Esav was the proper son to favor, Joseph also gave his father gifts. What were they?
The first was the fact that he kept his father informed of his brothers' misdeeds. A person of truth would do such a thing. He would not tolerate concealing what he saw if he felt it could be corrected.
The second was the second dream. Jacob rebuked Joseph for the claim that he and his wife would bow to Joseph, but, at the same time, the Torah tells us that he kept this dream in mind. I believe he did so because the dream implied that Joseph was going to have such importance in the world that even his parents would bow to him. He was somebody who would change history, and that was exactly what Jacob was looking for in a son.
Now we can understand why Joseph wanted to fulfill the dream in its entirety. As a man of truth, he knew that truth goes 100%. But, as a man of truth, he knew that he had a responsibility for bringing the entire world closer to truth. By demonstrating cruelty to his brothers in front of the Egyptians, he felt he would do even more damage to his mission of truth.
But there is a danger in too much truth. Human beings are not always truthful, and therefore Truth would harm them. Mercy is a different attribute which claims that, instead of destroying falsehood, it should be redeemed by being brought closer to truth. The Talmud tells us that Rabbi Akiva took some of the sages up into heaven. He gave them a strange warning, "when you see the place of the pure marble, do not say 'water water!'" Why? Because there is a verse in the Bible that says that "The speaker of falsehoods will not endure before Me."
In other words, even though this pure marble appeared to be water, and the rabbis felt they were saying the truth, the tolerance for falsehood in heaven is far lower. This was Joseph. He suspended his own feelings in the service of truth. He wouldn't even allow the brothers to feel guilt for what they had done to him since it was clearly part of a Divine plan. He did point out their own falsehoods when, responding to Judah's claim that if Benjamin were to be harmed that it might cost Jacob's life, by asking if Jacob was alive now after what had happened to he himself.
Judah, on the other hand, was a repentant sinner. He had admitted his misdeeds with Tamar, and was ready to take responsibility for his part in the sale of Joseph. So much so, that he was ready to take Benjamin's place as an act of ultimate responsibility. Judah gave much importance to feelings and humanity, and thus was deemed the better leader among men.
Truth is absolute, stretching across all areas of life. Humanity, feelings, are also the truths of the human being. A true leader knows how to guide those feelings to bring each and every person closer to the truth of God.