When you were slaves to sin, you were free from the control of righteousness.
What benefit did you reap at that time from the things you are now ashamed of? Those things result in death!
But now that you have been set free from sin and have become slaves of God, the benefit you reap leads to holiness, and the result is eternal life.
For the wages of sin is death, but the gift of God is eternal life in Christ Jesus our Lord.