And We gave Moses the Scripture, after We had destroyed the former generations, as enlightenment for the people and guidance and mercy that they might be reminded.
Verily I gave Moses the Torah after I had sent My Messengers to the previous nations who were destroyed because they disbelieved. In this Torah were clear evidences and teachings showing people that which would benefit them and that which would lead to their harm. Therein was instruction towards goodness and mercy leading you to the good of both this world and the Hearafter. Perhaps then they would contemplate over the bounties of Allah upon them, showing gratitude and believing in Him.