(And they came upon a people devoted to some of idols. They said: "O Musa! Make for us god as they have gods." He said: "Verily, you are a people who know not. Verily, these people will be destroyed for that which they are engaged in. And all that they are doing is in vain.") 7:138-139 Then, Allah made a covenant with Musa of thirty nights after which He added to them ten more nights. Thus, they were forty nights in all. The covenant was that he was to fast these number of days, during both the day and night. Thus, Musa made haste to go to the Mountain and he left his brother, Harun, in charge over the Children of Israel. This is why Allah says,
Sayyidna Musa (علیہ السلام) and the Bani Isra'il, having escaped the Pharaoh's wrath and having crossed the river in safety, proceeded on their journey. Soon they came upon a people who worshipped idols. They said to Sayyidna Musa "These people have adopted the idols as their gods who are visible as well as tangible. Do give us also a god whom we can see and touch.", Sayyidna Musa علیہ السلام replied,إِنَّكُمْ قَوْمٌ تَجْهَلُونَ ﴿138﴾ إِنَّ هَـٰؤُلَاءِ مُتَبَّرٌ مَّا هُمْ فِيهِ وَبَاطِلٌ مَّا كَانُوا يَعْمَلُونَ ﴿139﴾ ("You are really an ignorant people. at these people are in, is sure to be destroyed; and false is what they are doing." - 7:138-139.)
After crossing the gulf, Moses and his companions pushed onwards until they reached the Sinai desert. They then went to the foot of Mount Tur, where they were given the code of ethics (shari‘ah) in the form of ten commandments with due solemnity. These people remained in the Sinai Desert for almost forty years. Here, as a special gift of God, they were provided with water and food, manna (mann) and quails (salwa). This arrangement continued till a subsequent generation reached the fertile area of Palestine. Almighty God’s subjects can expect their Creator, as a matter of their right, to provide them with sustenance, whatever the circumstances. That is what they are entitled to. And God has the right to expect that his subjects will never under any circumstances be arrogant or disobedient towards Him. For those who remain grateful to God for His blessings, there shall be further blessings from Him, but for those who become arrogant, there shall be severe and unending punishment.
Uthmani text of the Madinah mushaf (King Fahd Complex). Translation: Saheeh International. Tafsir via Quran.com.