מלבי"ם - 37:14 “ויאמר לו לך נא ראה את שלום אחיך ואת שלום הצאן והשבני דבר” – “And he (Yaakov Avinu) said to him (Yosef): Go now, look into the welfare of your brothers and the welfare of the flock, and bring me back word.” How are we to understand how Yaakov Avinu could have sent Yosef to check on his brothers, when he knew that his brothers hated him? It would seem that it was obvious to all, that sending Yosef was sending him to a place of grave danger, potentially life threatening. Indeed, it was, for at one point the brothers planned on killing him. Additionally, how are we to understand that the holy Shivtei Koh, the children of Yaakov Avinu, could sell their own brother into slavery? The Midrash is explaining that in fact, Yaakov and the brothers were led by Hakodosh Boruch Hu to act as they did, in order to set in motion the events that would culminate in the Golus of Yaakov and his sons to Mitzrayim, as was decreed and told to their ancestor, Avrohom Avinu. It is not that Hakodosh Boruch Hu took away from the brothers their Bechirah, their choice, and that was why they acted the way they did. Rather, the brothers did retain their freedom of choice, however, it was their honest belief that Yosef was guilty of sins that were punishable with death. They sat in judgment and that was their ruling. Although they were wrong, nonetheless, they acted completely L’shem Shomayim. Hakodosh Boruch Hu generally protects the righteous from sin, however, in order for the decree to be able to come to fruition, He allowed them to sin. Hakodosh Boruch Hu hid from Yaakov Avinu the hatred that the brothers had for Yosef, and thus Yaakov sent Yosef to check on his brothers. In truth, there should be no blame upon the brothers for selling Yosef, for Hakodosh Boruch Hu guided their actions and events that led to the sale of Yosef. It was really all the handiwork of Hakodosh Boruch Hu. (Perhaps their sin was not the selling pf Yosef, but how they dealt with it. Chazal tell us that they had a Seudah after it, and they did not seem to be too concerned with the terrible effect it had on their father).
