وَمَا أَرْسَلْنَاكَ إِلَّا رَحْمَةً لِلْعَالَمِينَ
We sent you only as a mercy to the worlds. (Qur'an 21:107)
One objection says that revelation increases responsibility and therefore exposes disobedient people to blame; how can this be mercy? The reply distinguishes the purpose of guidance from a person's refusal of it. Explaining a safe path and warning against harm are acts of mercy even if some reject the guidance.
A remedy benefits a patient by being available, although a patient may decline to use it. Likewise, rejection does not negate the benefit intended in prophetic guidance.