There are 4 verses in the Holy Book in which Arbaeen is mentioned, 3 of which are about the Bani Isra’il.
As for Moses (AS), the Quran says in Verse 51 of Surah Al-Baqarah: “Then We called Moses for an appointment of forty nights. You began to worship the calf in his absence, doing wrong to yourselves.”
In Surah Al-Aaraf, however, God explains that first there was a 30-night stay on Mount Sinai (also known as Jabal Musa) for the revelation of the Torah and divine verses and then it was completed with the addition of ten nights: “We appointed for Moses thirty nights, and We completed them with ten more; so that the appointment with his Lord took forty nights.” (Verse 142 of Surah Al-A’araf)
This shows that worshipping God for forty days can have special outcomes.
The number 40 also is mentioned about divine punishment. For example, during the prophethood of Noah (AS) it rained for forty days to punish the infidels. It is also said that as a result of some sins, one’s Salah is not accepted for forty days.
Read More:
We also read in Surah Al-Ma’idah that Bani Isra’il became involved in sins and in order to become purified and become worthy to enter the Holy Land, they were stranded for forty years. “The Lord said, ‘The land will be prohibited to them for forty years (during all such time) they will wander in the land. Do not feel sad for the evil-doing people.’” (Verse 26 of Surah Al-Ma’idah)
In fact, they were stranded in that land for forty years as atonement for their sins.