The twist of Liza-Lu and Angel together at the end of Tess of the d'Urbervilles is odd, like you say, and does seem somewhat unnecessary. However, there are some points which can explain why Hardy added it.
Firstly, it contributed some sort of resolvement to the ending. Tess is given the death penalty for her murder of Alec. We see this almost through Liza-Lu and Angel's eyes as they wait in Wintoncester for Tess's death to be signalled:
Upon the cornice of the tower a tall staff was fixed. Their eyes were riveted on it. A few minutes after the hour had struck something moved slowly up the staff, and extended itself upon the breeze. It was a black flag.
"Justice" was done, and the President of the Immortals, in Aeschylean phrase, had ended his sport with Tess.
Ch. 59
The finality of these sentences is crushing to the reader and really defines the tragedy of the novel. But there is no dénouement (or narrative closure) yet, nor the necessary catharsis (a key part of tragedy, the release of tension and anxiety) that this stage should induce. Yes, Tess is dead and that is somewhat a closure in itself, but there is no emotional closure; the short sentence "It was a black flag." is flat, emotionless and provides no release for the reader from the tragedy so Liza-Lu and Angel's union and subsequent reaction to Tess's death aimed to induce the necessary catharsis. Helena Michie's Sororophobia: Differences Among Women in Literature and Culture notes that the fulfillment of emotional satisfaction was essential to the Victorian reader and hence explains Liza-Lu's role:
By embodying principles of literary closure, Liza-Lu forces herself awkwardly, absurdly, onto the novel, undercutting the tragic dignity of Hardy's ending.
This 'closure' was a contemporary 'principle', and although tragedy is often viewed now as heartbreaking but also in many cases a fitting ending to a narrative, in Hardy's day, readers liked warm and fuzzy endings more; although classics were still appreciated, with the birth of the novel, audiences generally wanted satisfying happy endings. There could also be an element of irony in this resolution as in his book, The Descent of the Imagination: Post-Romantic Culture in the Later Novels of Thomas Hardy, Kevin Z. Moore claims:
Angel and Liza-Lu evoke only to mock the redemptive possibilities of the romantic epic.
Secondly, Hardy has made Liza-Lu symbolically act as the person Tess could have been had Alec not violated and consequently disgraced her. Tess's ideal life would have been to never have met Alec, marry Angel when she first met him and lived a simple but happy life together. Interestingly, Liza-Lu's original name was Tess in the earlier drafts of the novel before Hardy renamed her. Tess describes Liza-Lu thus when she asks Angel to marry Liza-Lu:
"She is so good and simple and pure. O, Angel--I wish you would marry her if you lose me, as you will do shortly. O, if you would!"
"If I lose you I lose all! And she is my sister-in-law."
"That's nothing, dearest. People marry sister-laws continually about Marlott; and 'Liza-Lu is so gentle and sweet, and she is growing so beautiful. O, I could share you with her willingly when we are spirits! If you would train her and teach her, Angel, and bring her up for your own self! ... She had all the best of me without the bad of me; and if she were to become yours it would almost seem as if death had not divided us.... Well, I have said it. I won't mention it again."
Ch.58
Tess views herself as "good and simple" but not pure like her sister; she is the 'unblemished', 'unsullied' version of Tess:
"a spiritualized image of Tess, slighter than she, but with the same beautiful eyes"
(As a side note, the irony of the Angel and Liza-Lu match is that in the Victorian era, it was forbidden to marry your sister-in law as she was considered to be like a sister by blood, hence Angel's comment "And she is my sister-in-law"; this does make their prospective marriage even more bizarre. So perhaps the match was also included to exude shock from contemporary readers.)
Liza-Lu is known to be nearly sixteen (4 years younger than Tess), the age Tess was when she went to the Chase with Alec, and so Tess sees their union as a chance for Liza-Lu to achieve Tess's own aspirations, marry Angel, and not fall prey to disgrace.
Reference
"Why didn't you stay and love me when I--was sixteen; living with my little sisters and brothers, and you danced on the green? O, why didn't you, why didn't you!" she said, impetuously clasping her hands.
Ch. 31
So, Angel and Liza-Lu's union is essentially the embodiment and fulfillment of Tess's last wish.