Just as a note, Chick isn’t saying the Marshal is wrong to do good. He’s saying that the Marshal’s wrong in thinking that, by doing good, he’ll go to heaven. (You’ll note that Chick also mentions that since the preacher came to town, the people of the town have stopped drinking, gambling, hellraising, and being prostitutes). So, the town has turned from evil to good, but it’s done so because the people have been saved by Christ, through the preacher.
This is one of those fundimental debates in Christianity that doesn’t seem to go away. What it comes down to is the question, “Are people naturally good, or naturally evil?”, and one of the first times you saw this debate really explored was in fifth century Christianity. There was a British monk named Pelagius, who said that people were naturally good, and that it’s theoretically possible, at least, to lead a virtuous life, and be worthy of going to heaven. For Pelagius, Jesus came to earth to teach humanity how to be good. He was the perfect, sinless man, so by living a life like Jesus, mankind could go to heaven.
Opposing him was Augustine, the Bishop of Hippo. Augustine said that mankind is naturally evil…that Adam’s disobedience permanently corrupted the human spirit, and that it was neccesary for Jesus to sacrifice himself to remove the taint of Adam’s sin. Because he did this, Augustine said, if you accept Jesus as the savior of mankind, God will give you the gift of divine grace, which will allow you, in spite of your evil nature, to enter heaven. This is important, since, because we are inherently tainted with an evil nature, nothing we can do can ever be worthy of getting us into heaven.
Augustine’s side ended up “winning” the debate, in large part because he was saying stuff that had been widely accepted, if not explicitly spelled out, in the past.
You also saw this debate break out during the Reformation. Luther and the Protestants accused the Catholic Church of teaching the doctrine of “Justification by Works”…that good moral behavior would get you into heaven. (This was partly due to the fact that the Catholic Church at the time did focus a lot on moral teaching, and partly because of the indulgence controversy, which is really too much to go into here.) Luther and the other early Protestants argued instead for “solo fide”…faith alone; that only by a personal decision to have faith in Jesus as savior, will one gain entry into heaven, and conversely, if one rejects Jesus as savor, he assures his condemnation into hell. This isn’t to say that Luther thought moral actions were unimportant. He did believe that Christians had a duty to act morally. He just said that acting morally didn’t give you any credit in the eyes of God.