In order to answer this question, we must first define the terms used. What does it mean to be sinful? And what does it mean to do good? The popular understanding of the term “sinful” implies that one does bad things, which necessarily precludes the idea of “doing good”. I contend that this isn’t an accurate understanding of sin.
Sin is wilful rebellion against God and His intentions for humanity. To see sin as merely an act is to take a very shallow and superficial view of it. Jesus himself said in Matthew 5:28 that the thoughts of the heart are just as sinful as the actions of the body.
I like to think of sin in terms of the Anglican prayers of preparation and of repentance. Once we have heard the two commandments, we pray, “Almighty God, to whom all hearts are open, all desires known, and from whom no secrets are hidden…” A few minutes later, we also pray, “I have sinned against you in thought, word, and deed, and in what I have failed to do…”
This is a very powerful statement on the nature of sin. It makes explicit that sin begins with the thoughts, and progresses to our words and deeds (or lack thereof). It reminds us that God doesn’t look at our actions, but at the thoughts and intentions behind those actions.
So, if we are sinful, how are we capable of doing good? The sin occurs in the thoughts behind the deed, and not in the deed itself. Many deeds that we see as “sins” are merely consequences of the thoughts. We might perform a deed which would be seen externally – by other humans – as being a good thing. We might do great things to help others. But our intention behind doing them – even if we are not aware of it – is never entirely altruistic. We always have thoughts of what we might gain from what we are doing, and these thoughts of benefits to the self provide, to a great or lesser extent, the motivation for performing any deed.
God, unlike other humans, sees not just our actions but the intentions behind those actions; our hearts are open books to him, and he knows our desires and sees our secrets, even the ones we hide from ourselves. While we might do good things, and we might think we are doing them for pure reasons, we will always “fall short of the mark”, to use a somewhat more literal translation of the Hebrew verb CTA (“to sin”). Thus, even though humans are capable of doing good in relation to other human beings, we cannot live up to God’s standards.