The gemara (Pesachim 53) teaches that Chanayna, Misha’el, and Azarya deduced that they had an obligation to sacrifice their lives and be tossed into a burning oven at Nevuchadnezer’s hands from the fact that during the plague of frogs the frogs jumped even into the Egyptian ovens, forfeiting their lives.
There seems to be a clear difference between these two cases. G-d specifically commanded that the frogs enter even the ovens of Egypt. G-d never specifically commanded Chananya, Misha'el, and Azarya to be tossed into an oven. How could they draw an analogy from the frogs to their situation?
The Sha’agas Arye is quoted as answering that G-d commanded that the frogs enter the ovens, the bedrooms, the kitchens – every area of Egypt. The frogs as a group had to be everywhere. However, no one said that any individual frog had to enter an oven as opposed to a bedroom, or vica versa. The fact that a frog would choose to jump into an oven demonstrates the chiyuv of self-sacrifice which Chananya Misha’el and Azarya imitated. (See Rashi/Tosfos why they needed the frogs as a model when there is a chiyuv of kiddush Hashem is learned from pesukim.)
Maharil Diskin is troubled by this answer. If every frog had a choice whether it wanted to be the one to jump into an oven, it is entirely possible that all the frogs could choose to not jump into ovens. How then would the command that frogs be everywhere – including in the ovens – be fulfilled? The will of all frogs cannot be greater than the sum of their individual decisions. Maharil Diskin therefore gives a different answer to this question, as to many other meforshim.
The debate between the Sha’agas Arye and Maharil Diskin parallels a debate between the Rambam and Ra’avad. The Rishonim ask why the Egyptians deserved punishment for enslaving Bnei Yisrael when Hashem had already told Avraham in the bris bein ha’besarim that his descendents would be slaves. Rambam (Hil Tshuvah 6:5) answers that while the Egyptian nation as a whole was destined to enslaved Bnei Yisrael, each individual Egyptian had a choice whether he/she would be part of that victimization. Ra’avad disagrees and argues that if each individual Egyptian could potentially choose to not participate in the enslavement, how could it be guaranteed that the Egyptian nation as a whole would enslave Bnei Yisrael? The whole cannot be greater than the sum of those individual choices. Ra’avad therefore offers a different answer: the Egyptians went above and beyond in their persecution of Bnei Yisrael and were therefore culpable. (There is another answer as well – ayen sham.)
In a nutshell, it seems like the issue here boils down to whether we allow for some form of soft determinism in our conception of bechira. (What bothers me is how the Ra'avad's rejection of the Rambam here fits with what sounds like his own form of soft determinism at the end of ch 5 of Hil Teshuvah.)