According to SparkNotes, the main theme of Great Expectations is that "Affection, loyalty, and conscience are more important than social advancement, wealth, and class." Though Pip is initially motivated by a desire to improve his situation in life and fulfill his own "great expectations," he eventually discovers that becoming a gentleman does not necessarily make him a better person.
The novel is meant to be a satirical look at England's rigid Victorian class system, and Pip's journey from blacksmith's apprentice to learned gentleman demonstrates the absurdity of connecting one's social class with their character. This is perhaps best embodied in the character of Magwitch, the escaped convict that Pip helps in the opening of the novel. As SparkNotes points out, Magwitch, for instance, frightens Pip at first simply because he is a convict, and Pip feels guilty for helping him because he is afraid of the police.
By the end of the book, however, Pip has discovered Magwitch’s inner nobility and is able to disregard his external status as a criminal. Pip also prioritizes his relationship with Miss Havisham and Estella over his relationship with Joe, who is loyal but poor, simply because of Miss Havisham's wealth and social status. Pip's blind ambition leads him to wrongly believe that Miss Havisham is his wealthy benefactor. However, when Magwitch reveals himself as Pip's benefactor, Pip realizes his own prejudices.