For I do not understand my own actions. For I do not do what I want, but I do the very thing I hate.
Romans 7:15 ESV
We all sometimes say “I don’t know what I was thinking.” Paul is making a rhetorical statement only. Clearly he does understand his own actions because he goes on to explain them.
The sinful inclination drives us to behave in ways that we know are wrong and even in ways that we really don’t want. No matter how spiritual, sanctified, and knowledgeable we might be, we still sin.