The Prescribed Punishments Are an Expiation
It is narrated in the Two Sahihs from Ubadah ibn al-Samit (may Allah be pleased with him) that the Messenger of Allah ﷺ said:
“Pledge allegiance to me that you will not associate anything with Allah, that you will not commit adultery, steal, or kill unjustly. Whoever fulfils this pledge, his reward is with Allah. And whoever commits any of these things and then is punished for it in this world, that will be an expiation for him. And whoever commits any of these things and then Allah conceals it for him, his matter is left to Allah: if He wills, He will forgive him, and if He wills, He will punish him.”
This hadith makes clear that the prescribed punishments are an expiation for the one on whom they are carried out.