Pip identifies with George Barnwell because Barnwell is an apprentice, and so is Pip.
Although Pip calls the play “an affecting tragedy” it is more sarcastic than descriptive. Pip does not so much identify with the character as Wopsle wants him to. Pumblechook and Wopse think it’s funny that Pip is an apprentice, like the character, and use it to tease him.
Pip finds the play long and boring, and is annoyed with the teasing.
What stung me, was the identification of the whole affair with my unoffending self. When Barnwell began to go wrong, I declare that I felt positively apologetic, Pumblechook's indignant stare so taxed me with it. (ch 15, enotes etext p. 82).
Poor Pip even feels bad when he discovers that his sister has been attacked!
WITH MY HEAD full of George Barnwell, I was at first disposed to believe that I must have had some hand in the attack upon my sister, or at all events that as her near relation, popularly known to be under obligations to her, I was a more legitimate object of suspicion than any one else. (Ch 16, p. 85).
Of course Pip is not the one who attacked his sister, and is not actually prone to violence! This is an interesting example of foreshadowing, because Pip is indeed closely tied to both the attack on his sister and to violence through his association with Magwitch, even though he does not know it yet! All Pip knows is that he still has a strong sense of guilt for helping the convict.
There's a layer of irony to this story, because the play depicts an apprentice corrupted by a prostitute, and Pip is brought to his doom in a way by Estella.