In Surah al-Baqarah the khitab [address] is mainly to the Bani Israel [Jews living in Madina]. They are being narrated tales of their ancestors [who lived in Egypt, Syria and Palestine area, (at one time in History this was all same region)] during the times of Prophet Musa `alayhi salaam.
The Surah highlights examples of Allah’s favors upon them and their ingratitude in reciprocation.
The first incident that Allah subhanahu wa ta`ala talks about is the parting of the sea and their escape from the slavery of Pharaoh. [Ayah 50]
Right after that Allah subhanahu wa ta`ala says,
وَإِذْ وَعَدْنَا مُوسَى أَرْبَعِينَ لَيْلَةً
which can be translated as, “And [recall] when We made an appointment with Musa for forty nights.” [Ayah 51]
Then in Ayah 53, He mentions the purpose of this meeting,
ءَاتَيْنَا مُوسَى الْكِتَـبَ وَالْفُرْقَانَ لَعَلَّكُمْ تَهْتَدُونَ
“We gave Musa the Scripture and criterion that perhaps you would be guided.”
What’s the link here?
He brings them relief from a tyrant and calls their Prophet for “training” him.
For years they were living under slavery and had no self-respect. Their self-esteem was crushed. They were now blessed with a new life and a respectable living. They required guidance and a direction in life. That is the time that Allah subhanahu wa ta`ala chose to bless them with His Book.
And this is the same reason why Allah subhanahu wa ta`ala sent us the Qur’an So that we could be guided to the right path, recognize our purpose in life and get a direction.
These are not tales of past nations so we can mock at them but rather these incidents are quoted so that “we”, the Muslims, can take heed and not repeat their mistakes.