Why would Yisrael have died immediately if they had not accepted the Torah?
(19,17) “And Moshe brought forth the people towards G-d from the camp, and they stood at the bottom of the mountain.”
Rashi brings here the teaching of Chazal from the gemora Shabbos 88a that Hashem held the mountain over Yisrael and said: If you accept the Torah, good; but if not, there will be your burial place. This teaching is understood to mean that Hashem forced Yisrael to accept the Torah, and this is certainly what the continuation of the gemora implies. But this is not the full picture.
R. Shlomo Kluger explains that the name Elo-him which signifies the attribute of justice is used here because Yisrael were being judged here - either accept the Torah or die! But Rashi in the beginning of the Torah explains that the world was created both with the four letter name of Hashem which signifies mercy and also with the name Elo-him which signifies justice. The Arvei Nachal explains that if the world was created only with the attribute of justice then when a person sins he would immediately die for transgressing the word of Hashem. Therefore, Hashem added the attribute of mercy to protect him from the justice that he deserves so that he may continue living and have the opportunity to repent. So why here did Hashem invoke only the attribute of justice?
The answer can be learned from the words of Reish Lakish in the gemora Shabbos who asks why it says “and it was evening and it was morning, the sixth day” (Bereishis 1:31). He answers that it is to teach us that Hashem stipulated that the creation of the world depended on whether or not Yisrael will in the future accept the Torah, which was given on the sixth day of Sivan. If Yisrael accepts the Torah then the world will continue to exist, but if not the world will return to a state of emptiness and formlessness.
Thus, at the giving of the Torah there was no place for the attribute of mercy to give them time to do the right thing - they had to choose there and then to either accept the Torah or die. (Even though Yisrael were given a choice, since it was barely a choice it is considered as if they were forced to accept the Torah.)