Messengers as bearers of good news as well as of warning in order that mankind should have no plea against Allah after the Messengers. And Allah is Ever All-Powerful, All-Wise.
The Reason Behind Sending the Prophets is to Establish the Proof
(Messengers as bearers of good news as well as of warning,) meaning, the Prophets bring good news to those who obey Allah and practice the good things that please Him. They also warn against His punishment and torment for those who defy His commandments. Allah said next,
(in order that mankind should have no plea against Allah after the Messengers. And Allah is Ever All-Powerful, All-Wise.) Allah sent down His Books and sent His Messengers with good news and warnings. He explained what He likes and is pleased with and what He dislikes and is displeased with. This way, no one will have an excuse with Allah. Allah said in other Ayat,
(And if We had destroyed them with a torment before this, they would surely have said: “Our Lord! If only You had sent us a Messenger, we should certainly have followed Your Ayat, before we were humiliated and disgraced.”) and,
(And if (We had) not (sent you to the people of Makkah) in case a calamity should seize them for (the deeds) that their hands have sent forth. ) It is recorded in the Two Sahihs that Ibn Mas`ud said that the Messenger of Allah said,
(No one is more jealous than Allah. This is why He prohibited all types of sin committed in public or secret. No one likes praise more than Allah, and this is why He has praised Himself. No one likes to give excuse more than Allah, and this is why He sent the Prophets as bearers of good news and as warners.) In another narration, the Prophet said,
(And this is why He sent His Messengers and revealed His Books.)