I know that Surah Al-E-Imran 3 states:
He has revealed to you the Book with the truth, confirming what has been before it, and has sent down the Torah and the Injil.
Thus, we know that it is Allah who sent the words of the Torah and Gospel before the Quran.
What are the reasons that Allah first gave these books? I am confused as to why the Bible implies that the text is His final message, with words like:
If any man shall add unto these things, God shall add unto him the plagues that are written in this book: And if any man shall take away from the words of the book of this prophecy, God shall take away his part out of the Book of Life, and out of the holy city, and from the things which are written in this book --Revelation 22:18-19
I would like to understand the reason that Allah gave us messages like these, knowing that he would later give us the rest of His guidance. Why did Allah give us these other texts from before the Quran, which include such messages that lead people astray?