If pardon is possible, does punishment still have a warning function? Yes: a possibility of forgiveness does not assure any individual that he will escape the consequence. The warning remains serious, and the duty to obey remains intact.
For example, the possibility of a penalty being pardoned does not prove that the prohibited conduct is lawful or harmless. Likewise, possible pardon in the Hereafter does not erase the reality of scriptural threats.
Worship, repentance, reform, and the discharge of rights cannot be set aside on an unsupported assumption of personal pardon.