Allegra was the illegitimate daughter of Lord Byron and Claire Clairmont. The real Allegra died at the age of five of malaria, and it is reputed that Byron felt guilty about having neglected her during her short lifetime. So, what is she doing in David's opera – and in this book?
Well, on the surface, she shows up unexpectedly as a character in David's opera; even he doesn't see her coming until she gets there. If we are to take David's opera as a metaphor for his own experiences and understand Byron as a metaphor for David himself, then it's only fitting that there should be a stand-in for Lucy somewhere. That's where Allegra comes in. In David's opera, Allegra is on her deathbed, wailing in pain and misery for her father to come save her – and he doesn't. Oh, wait – doesn't David feel like he did the same thing to Lucy by not saving her when she was raped? Acknowledging the suffering of an ailing, ignored daughter in his opera gives David a way to deal with his feelings towards his treatment of Lucy in real life.