For reference here is a public domain score of the piece. I don't want to make any guarantees regarding the quality of the score, but for a superficial analysis I think it should be sufficient.
(This section contains some of my very subjective musings, for a more theoretical and slightly more objective analysis, skip to the next big line like the one above this sentence.)
Why it works so well for you only you can tell us, since nobody here knows what your musical taste is or what musical devices you respond to. But allow me to talk a bit about how I experience this coda.
The first few times I heard the piece it didn't make much sense to me at all; the whole piece is based on two units of material, introducing something completely new is something that is usually done about halfway a piece 1. The new material confused me, since the two known units of material have been repeated many times at this point, each time in a more virtuosic fashion, so you can feel the end of the piece has to be approaching, whereas the new material says we are only halfway. However, if the pianist connects it very tightly to the preceding section it can work very well, avoiding all confusion.
Why I suspect Liszt wrote it this way (note I do not have the ability to make a phone call with him, nor do I think I am Liszt's equal) is because he has to surpass everything happened earlier in the piece to "go out with a bang" as it were. Unfortunately, the two main pieces of material he has used so far are both quite light in character and both have been developed to their limits already, so he needs something new. This turns out to be not entirely correct after looking at the score, but I feel the OP is looking for a more intuitive answer in addition to a technical/theoretical one so this might be of some value.
In conclusion, my opinion is that it is a bit unusual, but it can work very well.
Now the facts! Unfortunately the score I linked to above doesn't have bar numbers (nor do any of the other public domain versions of the piece) so I'll have to be a bit verbose about where to find the bars I'm referring to, sorry! Page numbers will be from the start of the PDF document, not from the start of the piece (so bar 1 is on page 3).
I will answer your question at the end, but I think a broader analysis can only serve to better understand the piece (and besides, it's fun!) so the answer will be a tad lengthy.
As I alluded to earlier this piece is, in a nutshell, based on two units of material; one in g sharp minor (A) and one in B major (B). Basically, you can summarise the whole piece like this: "A, B, repeat" except with each repeat Liszt adds a ton of notes.
First we have a short introduction: all the repeated D#s in the beginning are the introduction. The neat part here is that A begins with a few repeated D#s, so the introduction is derived from and segues nicely into A. A starts in bar 6 (after the double bar line)2 and ends in the first bar of the third line on page 4. (VIDEO: 0:12 is the rest between introduction and A, 0:41 is between A and B.) The second bar of this line is the beginning of B, unsurprisingly. The end of B is a bit trickier since it transitions very smoothly back into A. In my opinion the beginning of page 6 marks the border between B and A (VIDEO: 1:15), but a more technical answer looking at the tonal content would dictate that the second eighth of the second bar of the third line of page 5 (VIDEO: 1:10) is the end of B (after this we modulate back to g sharp minor), with the remainder of page 5 being the retransition. My opinion is different because the technical end of B is quite weak and the beginning of the retransition doesn't really stand out, until you hear the clear echo of the beginning at the beginning of page 6 you are kind of waiting for the music to go back to B major. In a very cynical view, this was the whole piece.
Let's discuss the form of both A and B a bit, that way I can be more concise about the ensuing variations.
A consists of two parallel periods. In the stereotypical case, a period consists of two parts (often of the same length), the first of which has an "open end" (technical term: half cadence), the second of which has a closed end (authentic cadence). A parallel period is a period of which both parts begin in the same way. Reading the score you can see the same beginning 4 times, in bar 6, line 3 of page 3, the second half of line 4 of page 3 and the last bar of line 1/first bar of line 2 of page 5. 4 times, because each of the 2 parallel periods has 2 parts which begin this way and 2x2 = 4.
B is a bit more complicated, but it has to be a Satz (I will use the German word to avoid confusion, as is quite common in english conversation where I live.) It consists of an idea, a (possibly varied) repetition of that idea and then a "continuation". The continuation often has some relation to the initial idea (lengthening or shortening of the initial idea for example), but not necessarily. In a small scale, the following sentence is in the form of a musical satz: "A horse, a horse, my kingdom for a horse!" (Language-enthusiasts might sense similarities to rhetorical devices tricolon and climax.) Typically, the continuation is at least as long as the initial idea and repeat together. The initial idea of B is the beginning of B and is three bars long (strictly speaking, two since we can't really count the first one without its first beat). It is repeated immediately thereafter, just a third higher (repeating something starting from a different pitch is a type of variation typical of Satzes – we call it a sequence). The continuation starts with the initial idea (although now a fifth higher) but then expands it with new material (that will be very important later) in bar 2 of the first line of page 5 (VIDEO: 0:52). The continuation seems to end in the wrong key (F sharp major, first bar of line 2 of page 5) after which follow some sequences leading to the aforementioned weak cadence in B major. The rest leads us back to g sharp minor and I will call it the retransition without analysing it any further.
The second A has two variations, one for each period: first, the melody moves to the left hand so the right hand can play D#s in three octaves instead of just the one. The second period has the right hand playing the melody in sixteenth triplets. The second B has two main types of variation too: initially repeating 32nds an octave above the initial note instead of the jumping sixteenth at the beginning, but from the important new material in the continuation on extra trills in 32nds. The retransition has some very spectacular runs (VIDEO: 2:22).
The third set:
- first period,
- first half: 32nd trills on the D#s now, combined with an octave on each eight.
- second half: 32nd trills jumping an octave on each eight.
- Second period has the melody back in the right hand again with each melody note followed by a short trill an octave higher.
- The end of this A has another very spectacular run (VIDEO: 3:27)
- Initial idea and repeat: everything is jumping everywhere
- Continuation material, retransition: everything is now in chords and octaves, most eighths are broken into two sixteenth on the same notes.
Fourth set (nearly there):
- first period,
- first half: the melody that was once in eights has every note twice (sixteenth) and in octaves, larger chords in the left hand
- second half: begins the same as first half (but with a conspicuous change in harmony) and then ?!
And this ?! plays an important part in connecting the ending to the rest of the piece.
Because we are at the fourth set (enough is enough, right?) we have a very clear expectation about what's going to happen. Of course, we cannot really predict what kind of virtuosic hurdles Liszt is going to throw at the pianist now (honestly, what's left?) but we know the form and the melodic material almost (almost?) too well. First the two periods (with a melody we have heard twelve times over the first three sets, counting optimistically), then the weird sentence with the fake ending in the wrong key, then the theoretical yet inaudible ending and then the retransition.
So when the second half of the first derails shortly in the beginning this is a huge shock (yes, also if you don't know you expected all this, you'll notice – provided you were listening intently to the first sets). The derailment starts reasonably subtly with the harmonic shift, then gets really disrupting with the thick chords in the first bar of page 15, followed by impressive octaves. These thick chords and impressive octaves follow a very standard yet highly effective harmonic formula (Neapolitan sixth chord, I64, V) leading very strongly to the tonic on the ff under "Animato". Now comes the shakiest part of the construction where the pianist has to show his/her understanding because after every previous A section we had a clear break before each accompanying B section and if you do that here the coda seems like an out-of-place random add-on. The first chord of the Animato is a tonic chord which ends the very powerful preceding harmonic formula and it would be very plausible to end the piece with a few more simple chords (V, I, V, I for example); in other words this chord is very final but we have to go on – the connection in this moment is made as much by the performer as by Liszt, it's a bit shaky in the composition itself. Attentive score-readers would notice the figure in the left hand under Animato that seems to start here, rather than end: this is a very important detail, since it allows us to glue the last section on.
From the Animato it sounds like we have new material which would be very confusing (as mentioned in my subjective musings). I have to admit, until I looked at the piece after reading this question a couple of hours ago, I thought it actually was new material. Fortunately, there is a very clear link!
You might recall I drew attention to the original material in the continuation of the B section. In each of the B sections this material sounded very elegant because of two things: it is lighter and major rather than minor. Lighter refers in part to things the performer does (playing softer, less pedal) but in this case the notes are very clear: they are higher too, and the chords are mostly not as dense. Basically, the lower, longer and louder something is, the heavier we experience it.
The material of the coda is not a literal quote of the B section material. It is shortened (a term I mentioned before). The technical term would be liquidation (really!) and the quoted material gets shorter and shorter towards the end (common ending-device).
The elegance you mention I don't hear, unfortunately (I find it rather militaristic and fierce), so I am not in the best of positions to explain to you why you experience it that way. However, I will take a guess: the repetition of the set of two sections has made you associate the elegance of the B section (where I most certainly hear the elegance) to the motif that is then used in the coda, colouring your experience of the coda.
Allow me this closing remark: the pianist in the video you posted is not bad, but doesn't remotely come close to the quality of the "big names". This is an incredibly famous piece, recorded by many incredibly famous people. Why don't you try, for example Seong-Jin Cho's recording, one of the many excellent recordings freely available on youtube. You might like Cziffra's as well, or possibly Triifonov's? Seong-Jin Cho is the latest winner of the highly prestigious International Chopin Competition. Cziffra is a bit older (1921-1994), pupil of a pupil of Liszt's and huge career. Triifonov has won many international competitions. Of the three recordings I linked (the first three by pianists I knew and liked I saw on YouTube) I like the Triifonov one the best, although he has some technical problems about three quarters into the piece. Note that the three recordings I linked to are all three live3 recordings, the one you posted is most probably the result of many takes.
If you have any questions, please, leave a comment.
- This is the first of many (mostly unmarked) gross oversimplifications. The reason for this is that I am trying to keep this answer accessible to as broad an audience as possible. The only prerequisite should be reading notes, anyone who has followed any analysis coursework should be able to figure out what I'm saying in the analytical part of this answer on their own anyway. I am including some time markings to the video in the question so those who do not read notes can follow along to get a general idea.
- Two things might not make sense to you if you are not very familiar with analysis or sheet music. First, the double bar line is halfway bar 5, so it is not technically a bar line since it doesn't signify the limit between two bars. However, generally they are (admittedly not very correctly) called double bar lines anyway. Initially you couldn't have them halfway bars, but classical composers are terrible rebels. Secondly, I'm writing A starts in bar 6 although we can all see that bar 5 contains the beginning. There is an odd rule (that has various compelling justifications) in analysis that says only the first beat of each bar is important when deciding which bars belong together. Since the first beat of bar 5 is still part of the introduction, bar 5 must be counted as part of the introduction, bar 6 is then the first bar we can count towards A.
- I'm not entirely sure about the Cziffra recording, but it sounds too old to have been edited. It might not have been the first take though. The other two recordings are both a single take, unedited, as far as I can tell.