The objection is serious only if forgiveness must follow a particular theory of debt and punishment. Islam does not teach that human sin creates a financial liability that must be transferred to an innocent person; it teaches that Allah judges with perfect justice and forgives with perfect wisdom and mercy.
Why the objection sounds compelling
The argument can be stated strongly: if sin is a real moral debt, then simply cancelling it seems to leave justice unsatisfied. If a criminal has harmed others, a judge who merely says, "I forgive you," may appear unjust. On this view, obedience cannot repay an infinite debt, and a final appeal to Allah's choice may seem arbitrary.
That concern rightly rejects the idea that salvation is earned by a few good deeds while serious wrongdoing is ignored. Islam does not say that. It says that every deed is known, every injustice matters, and no person is credited with another person's guilt.
What Islamic justice actually requires
Indeed, Allah does not do injustice, even as much as an atom's weight. And if there is a good deed, He multiplies it and gives from Himself a great reward.
Quran 4:40
Justice means that Allah does not punish the innocent, misrepresent anyone's deeds, or overlook the rights of victims. The Prophet Muhammad (PBUH) taught that wrongs between people are not erased by a claim of private devotion: the wrongdoer must restore rights, seek pardon, or face judgment. Thus, divine forgiveness is not a license to oppress.
At the same time, a rightful judge may waive a punishment. Forgiveness is not injustice when the one forgiving has the right to do so, and when forgiveness is granted according to wisdom rather than whim. Allah has also given clear principles: repentance is accepted, faith and righteous action matter, persistent rejection of truth is not treated like sincere repentance, and associating partners with Allah is not forgiven for one who dies upon it without repentance.
Indeed, Allah does not forgive association with Him, but He forgives what is less than that for whom He wills.
Quran 4:48
Mercy is not arbitrary salvation
The Quran presents good deeds as genuine causes of reward, but not as a price that forces Allah's hand. Even our ability to believe, repent, and do good is itself a gift. The Prophet (PBUH) said:
No one will enter Paradise by his deeds alone. They said, "Not even you, Messenger of Allah?" He said, "Not even me, unless Allah covers me with grace and mercy."
Sahih al-Bukhari and Sahih Muslim
This does not make deeds meaningless. Rather, deeds are the means Allah has commanded, while mercy is the ultimate basis of salvation. The objection therefore establishes that salvation cannot be reduced to a crude calculation of merit. It does not establish that Islamic forgiveness is arbitrary. Islam affirms both sides: Allah never wrongs anyone, and He may mercifully forgive whom His justice and wisdom permit.