This time between leaving Mitsrayim (Egypt) at Passover and arriving at Mt. Sinai for Shavuot was a time of testing and training for YAH's people. They had to be prepared to receive the Torah. In Mitsrayim, the Hebrews had descended to one of the lowest spiritual levels while in slavery. Now, before they could accept YAH's laws, they had to come up to one of the highest spiritual levels. A major spiritual transformation was in order.
For several generations, the Hebrew people had been slaves - depending on their Mitsrite (Egyptian) masters for their very existence. In order to accept the Torah, they had to change this 'slave mentality.'
No longer would they depend on Mitsrayim for their existence, but instead put all their trust and dependancy on YAHUAH. No longer would they be slaves to Pharaoh, but they would be servants of Elohim. No longer would they worship idols as some of them had begun to do (Ezek. 20:6-10) but they would worship the Most High YAHUAH only.
This type of transformation required that the Hebrews go through a period of testing and training. They had to break their slave mentality and completely rebuild their spiritual character to YAH's standards. Then, and only then, would they be ready to receive the Torah and fulfill their spiritual purpose of being a light to the nations, proclaiming His Name throughout the earth.
For seven weeks, as the Hebrews traveled from Mitsrayim to Sinai, YAHUAH prepared His people. At the Red Sea, they feared being recaptured by Pharaoh, but YAH delivered them and brought them through the Sea on dry land. Then, the sea closed - cutting them off from Mitsrayim forever. He then tested them with hunger and thirst, while they grumbled to return to Mitsrayim. YAHUAH then made bitter waters sweet, brought water from a rock, and provided bread from Heaven. They faced certain defeat as the Amalekites came to fight against them, but Moshe raised his hands to Heaven and Yehoshua (Joshua) won the battle.
Each challenge, each obstacle, each life-or-death situation was a test from Elohim. It was a test to see how much they truly depended on YAH. Each and every time, YAHUAH provided and took care of His people. He showed them time and again that they could -- and must -- put their complete dependancy on Him. Mitsrayim was no longer their provider; YAHUAH was their Provider. Mitsrayim was not their might-one, YAHUAH was their Elohim! Each time they looked to YAH for food, water, safety, etc. -- they were breaking that 'slave mentality' and rebuilding their spiritual character according to His way.