We might think that, provided you did the right thing, it did not matter how or why you did it—whether you did it willingly or unwillingly, sulkily or cheerfully, through fear of public opinion or for its own sake. But the truth is that right actions done for the wrong reason do not help to build the internal quality or character called a ‘virtue’, and it is this quality or character that really matters. (If the bad tennis player hits very hard, not because he sees that a very hard stroke is required, but because he has lost his temper, his stroke might possibly, by luck, help him to win that particular game; but it will not be helping him to become a reliable player.)
Quotes from Mere Christianity, Part 40
C.S. Lewis, Mere Christianity (1952; Harper Collins 2001) 80.