Miss Havisham's goal is to exact vengeance on men for what one man did to her, standing her up at the altar years earlier. Her whole life is consumed by the fact of this rejection, and she uses Estella as a surrogate for retaliation against the male sex. This is the reason for her encouragement of Estella breaking a man's heart. In this case, Pip turns out to be the innocent victim of the sort of blind justice Miss Havisham carries out.
The interesting thing about it is that Pip seems at least unconsciously to enjoy participating in this triangular dynamic with Miss Havisham and Estella. In the very first encounter, when they are playing cards, Estella begins insulting him about his inferior social status and the way it is reflected in his speech: "He calls the knaves jacks!" One would think the boy would want to avoid her as a result, but it's the beginning of his attraction to her and eventual obsession with her. Miss Havisham does succeed in making Estella break Pip's heart, but Pip is an illustration of the fact that some men have a psychological need to be hurt and find fulfillment in it.