When Yosef reveals his identity to his brothers he makes it clear that they should not be upset at having sold him into slavery. Additionally, neither G-d, nor Yaakov nor Yosef reproves them for their actions, since Yosef’s exalted position in Egypt will result in their survival. Essentially although they intended to harm their brother, the outcome was positive. Abarbanel asks the obvious question. Even though the sale of Yosef had a positive result, the transgression of the sale itself remains. An individual should not be exonerated just because his purposeful and evil behavior ends up having a positive outcome, especially an outcome that could not have been even remotely anticipated by the brothers at the time of the sale. Rather, what they intended was to doom Yosef to a miserable existence for what promised to be a dramatically shortened life.
Abarbanel explains that a famous verse from Proverbs (21:1) is the basis for understanding this conundrum: “Like streams of water, so is the heart of a king in the hand of G-d; wherever He wishes, so He directs it.” Abarbanel is telling us that the entire unfolding of these events was directed by G-d. Kings, rulers and statesmen who can, with a single word or action, alter the course of history, can become G-d’s agents to bring about specific important events. Just as farmers collect the winter’s rainfall and direct the ‘streams of water’ by means of dams, canals and ditches to the areas where it is most needed, so too can G-d direct a myriad of seemingly unrelated coincidences to produce His intended result. This is the metaphor of the king’s heart, for the heart is the ultimate motivator of human behavior.
In this case the brothers’ hatred of Yosef, a product of their own free will, gave G-d the ‘opening’, as it were, to direct the brothers to sell Yosef into slavery in Egypt. When Yosef realizes that they are afraid of retribution, he tells them, according to most translations, “And now, don’t be distressed or reproach yourselves for having sold me here, for it was to be a provider that G-d sent me ahead of you.” According to this translation it sounds like Yosef is telling them that despite having sold him, they shouldn’t be upset, because in the end good would result. Abarbanel, however, understands the verse as follows: “It is because you sold me that you shouldn’t be upset or reproach yourselves…” — your hearts were in G-d’s hands and you were doing His will.
Because the ensuing Egyptian exile and the subsequent miracles of the Exodus and the 40-year experience in the Wilderness were the seminal events in the creation of G-d’s chosen people, the principal actors in that drama had the status of great rulers who throughout history G-d has used to bring about dramatic shifts in the course of the human experience.