Pip's attitudes towards Magwitch change throughout the novel. We first see Magwitch through the child Pip's frightened eyes. To this young child, the convict is terrifying:
Hold your noise!" cried a terrible voice, as a man started up from among the graves at the side of the church porch. "Keep still, you little devil, or I'll cut your throat!
A fearful man, all in coarse gray, with a great iron on his leg. A man with no hat, and with broken shoes, and with an old rag tied round his head. A man who had been soaked in water, and smothered in mud, and lamed by stones, and cut by flints, and stung by nettles, and torn by briars; who limped, and shivered, and glared, and growled; and whose teeth chattered in his head as he seized me by the chin.
"Oh! Don't cut my throat, sir," I [Pip]pleaded in terror. "Pray don't do it, sir."
But for all his terror, Pip treats the convict with compassion. Magwitch never forgets this.
The next time Pip meets Magwitch, having learned it is Magwitch, not Miss Havisham, who has provided the money that has set him up as a gentlemen, he is repelled and horrified to think he owes his status to a convict. He is also distressed that he is harboring a convict, and is responsible for keeping him safe from arrest. This is the adult Pip, who is snobbish and class conscious. As Dickens well knew, our attitudes towards the world change as we grow up:
Nothing was needed but this; the wretched man, after loading wretched me with his gold and silver chains for years, had risked his life to come to me, and I held it there in my keeping! If I had loved him instead of abhorring him; if I had been attracted to him by the strongest admiration and affection, instead of shrinking from him with the strongest repugnance; it could have been no worse.
But by the end of the novel, Pip has changed again. His heart has softened, and he has been humbled. Now he can see the good in Magwitch beneath the outer wrapping and he genuinely wants to help him:
For now, my repugnance to him had all melted away, and in the hunted wounded shackled creature who held my hand in his, I only saw a man who had meant to be my benefactor, and who had felt affectionately, gratefully, and generously, towards me with great constancy through a series of years. I only saw in him a much better man than I had been to Joe.
Unlike a lesser novelist, Dickens portrays a character who changes and grows, developing compassion towards others through his own suffering.