In these places he speaks in the first person. I think he wishes to show approximately the following. Although transgression through ignorance is admittedly subject to condemnation, the Savior confirms that punishment will be heavier for those who know.
He says: "The one who knew his master's will and did not do it will be beaten with many blows. The one who did not know and did not do it will be beaten with few" (cf. Lk 12:47-48).
Therefore it is beyond dispute that to sin in ignorance is better than with knowledge of the law. If someone, having once lived apart from the law, has already come under the law, and then decides to despise its ordinances, Scripture convicts him of sin.
He has fallen under condemnation. Then he is tormented because of his carelessness and almost accuses the law aloud, saying: "I was once alive apart from the law. But when the commandment came, sin revived, and I died."
If sin is truly dead apart from the law, is it not persuasive to think that sin is in some way revived through the law? The law makes it evident and as if gives it soul, although it was formerly unknown, even if it was in us.
For we were not righteous. But since sin remained as though dead, because there happened to be no condemning law, we were alive. We found a convenient excuse for ourselves in ignorance, because "where there is no law, there is no transgression" (Rom 4:15), as the Apostle said.
Thus, when the commandment appeared before all, sin as if came to life. Death, curse, and condemnation were prepared for those who fall into transgressions because of their weakness.
What then? Something contrary to expectation and unforeseen happened to us. Paul says that the commandment, which was given for life, was found to serve unto death.
Sunlight also harms everyone whose eyes are weak, although by nature it is sweet and thrice desirable. It does not itself harm. Rather, in the injury suffered one must see the accusation of the disease from which they suffer.
In an equal sense, I think, he says that the commandment gave occasion to sin, allowing it to deceive through the commandment and to lead to death. But it can also be said another way.
Pleasure-loving very readily opposes the ordinances of the law. When corrupt dispositions are checked by self-control, they rise up still more strongly. Sometimes they take the mind captive, overthrowing it into transgression and leading it to the punishments imposed by the law.
Yet they had the law itself as the occasion for this hostility. Therefore, being wise, Paul says that we were deceived by the commandment and died through it. For it almost killed us by encouraging the desires in us to revolt in the manner already described.