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.