he gathered them together under guard for three days. Yosef said to them on the third day . . . "One of your brothers will be imprisoned under guard, and [the rest of] you go and bring provisions." (Mikeitz 42:17-19).
Why did Yosef have
to hold all the brothers under guard for three days before deciding to keep only one brother while allowing the rest to go? he could have offered this compromise immediately!
The brothers agreed to Yosef's plan to hold one of them under guard, because they knew that otherwise they would never be permitted to bring provisions back to their families. But there is a Mishnah (Terumos
8:12) that states, "If idolaters tell a group of women, `Hand over one of your number for us to defile, and if you don't we will defile all of you,' better they should defile all the women than that one single Jewish woman should be given over willingly to them." The Talmud Yerushalmi
(quoted by the Rash) extends this law to a case where idolaters
ask a group of people to hand over one person t0o be executed, or else they will all be killed. No Jewish life may be willingly sacrificed, even if this ultimately costs the lives of many more people.
Thus, if Yosef had made his offer of keeping one of the brother's hostage at the outset, the offer would have had to be refused. The brothers would have been obligated to stay together rather than abandon one of their number to an uncertain fate at the hands of the Egyptian authorities. Therefore, Yosef incarcerated all the brother at first, and afterwards released all but one. This way the brothers were not required to hand over anyone, for Shimon was already imprisoned.
-- Brisker Rav