In Breisheet 1:9 God said: “Let the waters beneath the heaven be gathered (yikavu hamayim) into one area and let the dry land appear.” And it was so.
According to Yalkut Shimoni the word “yikavu” comes from the word tikva, hope. It means that the waters will do whatever is necessary to help God in the future (even if it seems outside of the realm of nature).
Rabbi Yochanan in Breisheet Raba 5:5 points out that at the time of creation, God already planned for the splitting of the sea at the time of the Exodus from Egypt.
Rabbi Yirmiyahu ben Elazar takes this concept a step further and adds that at the time of creation God planned all of the changes in nature that would take place, not just the splitting of the sea. As it says in Kohelet 3:14, “I realized that whatever God does will endure forever: Nothing can be added to it and nothing can be subtracted from it…” In Yishayahu 45:12 we read: “I made the earth and created mankind upon it; It is I, My hands spread out the heavens and I commanded all hosts to come into existence.”
The Midrash continues, I commanded the heaven and the earth to be silenced before Moshe (in Parshat HaAzinu “HaAzinu HaShamayim VaAdabera…”, “Give ear, O heavens and I will speak…”). I commanded the sun and the moon to stand before Yehoshua (Yehoshua 10:12) at the time that he fought the Emorite kings (“Shemesh B’Givon don viyareach b’Emek Ayalon”, “Sun, stand still at Givon and moon in the Valley of Ayalon.” I commanded the ravens to feed Eliyahu HaNavi at the time that he was hiding from King Ahav (Melachim I, 17:4, 6: “I have commanded the ravens to supply you with food there…”, “The ravens would bring him bread and meat in the morning and bread and meat in the evening…”). I commanded the fire not to harm Chananya, Mishael and Azarya when Nevuchadnezar, King of Bavel threw them into the fiery furnace. I commanded the lions not to harm Daniel in the lion’s den. I commanded the skies to open up for Yechezkel (Yechezkel 1:1) “The heavens opened and I saw visions of God.” I commanded the fish to spit out Jonah (Jonah 2:11) “Then God addressed the fish and it spewed Jonah onto dry land.”
We see from here that at the time of creation God knew that unusual circumstances would come up throughout history and he therefore planned accordingly.
Chag Sameach and Shabbat Shalom from Yerushalayim!