Why does Paul consent to the law that it is good when he does the thing he hates?
Paul agrees the law is good because his wrongdoing is rebellion against the law's good statements. The law itself remains good; the old Adamic nature resists God and pushes mankind to do the opposite of what God commands and to do what God warns against.
Les explains from verse 16 that when Paul does what he would not, he consents under the law that it is good, because all he is doing is rebelling against the good statements of the law. The old Adam says, 'Forget the law; that's God's side; we're anti-God.' Mankind generally does the opposite of what God says is for his own good and does what Scripture warns against. Les notes this is the old Adamic nature taking sway, and though Satan and the old nature say, 'Do it; everybody else is,' that does not make it right.
If then I do that which I would not, I consent unto the law that it is good.