As-Salaam alaikum,
In Ayat 107 of Surat Anbiya of the Holy Qur'an (21:107), Allah Ta'ala says:--

"AND WE SENT YOU NOT, EXCEPT AS A MERCY TO THE WORLDS."

Indeed, the Noble Messenger of Allah, Sallallahu alaihi Wasallam, was/is a Mercy to the Worlds and all inhabitants therein. Still, one may ask why did some people... like Abu Jahl and Abu Lahb... refused to accept him?

As a Mercy to all creation, the Prophet, Sallallahu alaihi Wasallam, merely brings out what is already within people. Those whose soul are pure and ready to receive Imaan were/are able to receive him, and from such beautiful souls beauty shall emerge. But those whose souls are impure and unprepared will reject him, thereby bringing about their ugliness... have you not seen that the sun is a comfort for the entire world, and that it is a mercy to all beings?

But, if the sun shines on a pit of garbage, repulsive scents will emerge from it; and if it shines on a bed of roses, plesant scents will emerge from it. These defects do not come from the sun. Rather, these defects and disparities come from the roots of those things. Therefore, the one whose soul has become a 'bed of roses' is within the ambit of the Prophet's guidance and mercy. When such an individual attains perfection by following the Prophet, Sallallahu alaihi Wasallam, and travelling the spiritual path, he finds the Prophet waiting for him at the end of the road... taking him by the hand and leading him to the Threshold of the Divine Court.