He wasn’t forgiven because he suffered.
Without the shedding of blood, there is no remission of sins.
Suffering pain and torment do NOT cleanse someone from sin. There’s not one shred of verse of Scripture that supports that damnable doctrine.
People are going to end up in hell if they think they can atone for their own sins somehow. Because they won’t trust in Jesus for their atonement. They’ll be counting on their own efforts.
No, suffering and torment do not cleanse from sin. They have been a testing period for believers. While the thief was being tortured to death alongside Jesus, and apparently initially reviled the LORD, he later repented, believed, and was forgiven for his sins. He was purified and sanctified on the cross and did not apparently have much opportunity or inclination to sin again before his death. He endured the torture until the end without recanting his new faith. He was apparently not in need of any more sanctification to enter heaven, hence the prophetic truth of Jesus' words.
Amen.