As a bildungsroman, Great Expectations contains many an episode in which Pip learns lessons about the world in which he lives.
Goodness and politeness is not connected to one's social status; upper class people are not necessarily better.
After Pip's first visit to Satis House, he, like the inmates of Miss Havisham's self-imposed prison, is unsatisfied; for, he is ashamed of being "common" and desires to become a gentleman, believing that he will become more worthy then as a person. However, from his encounters with the cruel Estella and the exploitation of Miss Havisham, Pip learns that one's social status has nothing to do with the inner makings of a person.
In Chapter XXV, Pip is introduced to another student of Matthew Pocket, Bentley Drummle, who "came of rich people." However, he is described by Pip as
...he was idle, proud, niggardly, reserved, and suspicious. He came of rich people down in Somersetshire, who had nursed this combination of qualities until they made the discovery that it was just of age and a blockhead.
Later, Pip's rivalry with Drummle leads him to become petty as well. When, for instance, he meets Drummle at the Blue Boar in Chapter XLIII, Drummle belittles Pip's homeland marshes. Their encounter is acrimonious:
Then, Drummle glanced at me, with an insolent triumph on his great jowled face that cut me to the heart, dull as he was, and so exasperated me, that I felt inclined to take him in my arms (as the robber in the story-book is said to have taken the old lady) and seat him on the fire.
Of course, at the novel's end when Pip meets Estella, he learns that as her husband, Bentley Drummle has been extremely cruel, even having beaten her.
Real friendship is more valuable than any other association with others
Throughout the novel, Pip has tried to become a gentleman, thinking he will thus better himself. However, in so doing he becomes a snob and alienates himself from his family as he refuses to come to the forge to visit Joe and Biddy, who truly love him. However, after he is burned from his attempt to save Miss Havisham from a fire, it is the loving and charitable Joe--once snubbed when he came to London to visit--who returns to London to nurse Pip back to health. When Pip finally comes out of his delirium and recognizes Joe at his bedside, he is overcome with shame for the way he has treated his father-figure and friend,
""Oh, Joe, you break my heart! Look angry at me, Joe. Strike me, Joe. Tell me of my ingratitude. Don't be so good to me!"
"Which dear old Pip, old chap," said Joe, "you and me was ever friends. And when you're well enough to go out for a ride--what larks!"
....And as...I lay there, penitently whispering, "O God, bless him! O God bless this gentle Christian man!"
Ironically, Pip finally apprehends that love and friendship in his life have come, not from the upperclass to which he has so aspired, but from the lowly such as Magwitch, Biddy, and Joe.
When Magwitch visits Pip on a stormy night and reveals that he has been Pip's real benefactor, Pip realizes how his status as a gentleman has been dependent upon a convict who is breaking another law and jeopardizing his life by returning from Australia. But in a larger sense, Pip understands how the upper classes achieve their luxury and fine manners by exploiting the lower classes. He understands that when some people have too much, others will have too little.
The scene in which Trabb's Boy makes Pip look and feel foolish by pretending to be terrified of him and then running around the block to repeat the performance several times is one of the best things Dickens ever wrote. Pip begins to realize that he has become a dandy and a snob and furthermore that he is essentially still a lower-class nobody trying to play the role of a gentleman with somebody else's money.