When Bilbo regains consciousness, he is alone. He stumbles around, and sees that the goblins have been defeated. He thinks that if this is victory, it’s very disappointing. He meets a man who takes him to the Dale, where Gandalf, his arm in a sling, is standing beside Thorin, who has been fatally wounded.
Bilbo not only avoids the battle, he’s actually unconscious for most of it. Yet even waking he continues to express his doubts with battle, and with the supposed heroism of fighting. The fact that even Gandalf, the most powerful and seemingly immortal person in The Hobbit, is wounded suggests the brutality of the Battle of the Five Armies. Thorin’s fatal wounds suggest that he has been punished for his greed, yet the fact that he is next to Gandalf indicates that somehow he has found some kind of redemption: he did ultimately give up the security of the Lonely Mountain to join with the elves and men in their battle against the goblins.
On his deathbed, Thorin tells Bilbo that he regrets calling him a traitor and expelling him. He promises Bilbo his one-fourteenth of the treasure, noting that he is now traveling to the land where gold and silver can’t be carried. Bilbo, greatly moved, bids farewell to Thorin, and tells him that he feels lucky to have quested alongside him. Bilbo feels personally responsible for the battle, since it was he who stole the Arkenstone, but at the same time reasons that he can’t be blamed, since he stole the stone to bring about peace.
Tolkien, who was raised a Christian, alludes through Thorin’s words to an afterlife that the characters of The Hobbit can all access. This helps us understand why Thorin’s obsession with treasure is so small-minded: he can’t take it with him when he dies. It is a measure of Thorin’s ultimate goodness that he recognizes his own former greed and small-mindedness. In the midst of this Christian-influenced morality, Bilbo makes an unusual moral judgment of his own. He knows that he was responsible for the battle, insofar as he stole the Arkenstone, but he doesn’t feel that he’s done anything wrong, since his intentions were good. And, in fact, in a novel that regularly makes clear that both good and bad characters share traits like greed, one can argue that in fact the goodness or badness of character’s intentions are what separate the good from bad characters.
Bilbo learns what happened at the end of the Battle of the Five Armies. The Eagles had noticed the goblins marching toward the Lonely Mountain, so they flew to intervene, arriving at the last minute. Even with the eagles, the men, dwarves, and elves were outnumbered – only with the arrival of Beorn, taking the shape of a giant bear, were the goblins defeated. Upon seeing that Thorin was wounded, Beorn became so angry that he destroyed a huge chunk of the goblin army – so many of them that for years afterward the area around the Misty Mountains was safe and secure.
Beorn and the Eagles prove themselves to be invaluable, winning the battle for the men, dwarves, and elves. In this way, Gandalf proves himself to be the most important person in the Battle of the Five Armies—without his influence, his friends Beorn and the Lord of the Eagles would never have traveled to provide help.
The Eagles depart after intervening in battle, and Dain replaces Thorin as King Under the Mountain. All of Thorin’s original dwarves except for Fili and Kili survive. Dain is more generous with his birthright than Thorin was; he sends Bard one-fourteenth of the treasure, which Bard uses to help his people rebuild. Bard tells Bilbo that he would have given him a huge amount of gold, except that Bilbo’s share of the treasure, it had already been agreed, was to be given to the men. Bilbo says that he is relieved that he doesn’t have much treasure to take back with him, since it’s difficult to carry. He departs for his home, accompanied by Gandalf and carrying two chests of treasure with him. Before he leaves, he says goodbye to the dwarves, reminding them that they’re always welcome in his home. He also gives the Elvenking a necklace. When the Elvenking is confused, Bilbo explains that the necklace is a gift in return for his hospitality.
The Battle of the Five Armies results in peace and new trust between the dwarves, men, and elves, where before there had been huge tension. It’s as if the death and violence on the battlefield reminded everyone that there are more important things in life than wealth. Thus, Dain generously gives the people of Lake-town money to help them rebuild their town, and Bilbo gives the Elvenking a necklace—he even expresses his gladness that he doesn’t have much treasure to carry, where before he had worried that he would be given less than he deserved. In spite of Bilbo’s arguments and quarrels with the dwarves, he parts ways with them on excellent terms.
Over the course of the next year, Gandalf and Bilbo travel back to hobbit-town. While they have many adventures on the way back, the way is far easier than it was when traveling toward the Lonely Mountain, since most of the goblins are dead, having been killed at the Battle of the Five Armies. Beorn, who has become an important chief, is also responsible for protecting them during their travels home. As Bilbo and Gandalf climb the Misty Mountains, Bilbo looks behind him, and sees snow on the Lonely Mountain. Amused that where once there was fire there is now only snow, he thinks to himself that even dragons meet their end. He is feeling tired, and is eager to return to his home and armchair.
At the beginning of The Hobbit, Bilbo felt a vague, even subconscious desire to leave his home and travel elsewhere. Now, he is eager to return, and we sense that he’s quenched his desire for adventure, at least for some time. Bilbo’s quest forced him to grow, to discover things about himself he never knew, and at the same time to make him value what he had before: his home. Bilbo also shows signs of maturity when he muses on the sudden changes that the Lonely Mountain has undergone recently. The philosophical observations about the inevitability of change and death would be inconceivable coming from Bilbo at the beginning of the novel—his experiences with death and sudden change have clearly affected the way he thinks.