But thanks be to God that, though you used to be slaves to sin, you wholeheartedly obeyed the form of teaching to which you were entrusted.
As Paul writes to the Romans, he is thankful first and foremost for their salvation. The people had heard the gospel, accepted it, and now followed Jesus Christ.
Paul is also thankful for the obedience of the Romans however. Many Christians struggle with obedience. We are not magically given the ability to obey at the moment of salvation even though we are given the Holy Spirit.
What does change at salvation is our desire to sin. While we used to be slaves to sin as Paul says, we now want to obey and do what is right in God’s eyes.
Obedience comes with practice. We have to desire to do right and we must practice doing right. What we can be thankful for is that God does not leave us alone in our struggle with sin.
We are given the Holy Spirit who helps us in our struggle with sin. He is a guide to remind us of what we have learned from God’s Word and to prompt us when we do wrong. When we gain victory over an area of sin, we need to thank God because it is only with the help of the Holy Spirit that we are able.