Because he doesn’t see Eliza as a human being who played a huge part in their victory that night but instead only sees her as a part of his own victory with Pickering. The joke of the song is the “you” in “you did it” is not Eliza but they are saying it to each other.