Magwitch teaches Pip that kindness sometimes comes from unexpected sources. When Pip first encounters Magwitch at the graveyard, there's nothing even remotely kind about the escaped convict's behavior. He threatens and intimidates the young lad, telling him in no uncertain terms what will happen if he should breathe a word to anyone about what he's seen.
Yet in due course, and much to Pip's astonishment, it turns out that Magwitch was his generous benefactor all along, the man who out of the goodness of his heart, gave Pip the necessary funds to help him lead the life of a gentleman. In this class-conscious society, Pip would never have thought in a million years that someone like Magwitch would be capable of such a selfless act. But in the course of the novel, Pip learns, and not just from Magwitch, either, that you can't always judge a book by its cover.