[Elrond] took [the map] and gazed long at it, and he shook his head; for if he did not altogether approve of dwarves and their love of gold, he hated dragons and their cruel wickedness, and he grieved to remember the ruin of the town of Dale and its merry bells, and the burned banks of the bright River Running. (3.35)
The purpose of this quest is not a black-and-white case of good vs. evil. Sure, the enemy is an evil, murdering dragon. But what the dwarves are seeking more than anything else is treasure – as Bilbo points out much later in the novel, the dwarves have thought of "no way of getting rid of Smaug" (12.33). In a book where there are good races and bad races – the elves and the goblins, respectively, the dwarves are probably the closest things we have to a moral grey area.
[Bilbo] must stab the foul thing, put its eyes out, kill it. [Gollum] meant to kill him. No, not a fair fight. He was invisible now. Gollum had no sword. Gollum had not actually threatened to kill him, or tried to yet. And he was miserable, alone, lost. A sudden understanding, a pity mixed with horror, welled up in Bilbo's heart: a glimpse of endless unmarked days without light or hope of betterment, hard stone, cold fish, sneaking and whispering. All these thoughts passed in a flash of a second. he trembled. And then quite suddenly in another flash, as if lifted by a new strength and resolve, he leaped. (5.119)
Bilbo pities Gollum and so, even though Gollum "meant to kill [Bilbo]," he can't just stab Gollum without warning in the dark. Which creatures does Bilbo think it is OK to kill? Does Bilbo make the right ethical decision here?
Then Bilbo fled [with the cup]. But the dragon did not wake – not yet – but shifted into other dreams of greed and violence, lying there in his stolen hall while the little hobbit toiled back up the long tunnel. His heart was beating and a more fevered shaking was in his legs than when he was going down, but still he clutched the cup, and his chief thought was: "I've done it! This will show them. 'More like a grocer than a burglar' indeed! Well, we'll hear no more of that." (12.17)
Bilbo's still trying to prove himself to the dwarves even now that he has gotten them all the way to the Lonely Mountain thanks to his wits and good luck. Obviously, that line in the first chapter that Bilbo looks "More like a grocer than a burglar" really smarts. Like the dwarves, Bilbo doesn't seem to be thinking of his quest in grand moral terms. Given that this quest doesn't seem to be about good vs. evil exactly, why do you think Gandalf has chosen to get involved?
Dragons may not have much real use for all their wealth, but they know it to an ounce as a rule, especially after long possession; and Smaug was no exception. He had passed from an uneasy dream (in which a warrior, altogether insignificant in size but provided with a bitter sword and great courage, figured most unpleasantly) to a doze, and from a doze to wide waking. There was a breath of strange air in his cave. Could there be a draught from that little hole? He had never felt quite happy about it, though it was so small, and now he glared at it in suspicion and wondered why he had never blocked it up. (12.20)
Even though Smaug is evil through and through, we get more narrative from his perspective than we do from any of the goblins. Why might the novel spend so much time on Smaug's perspective (and even his feelings – like Bilbo, he has anxious dreams!)? What sense do we get of Smaug's motivations in The Hobbit?
"I am Bard, and by my hand was the dragon slain and your treasure delivered. Is that not a matter that concerns you? Moreover I am by right descent the heir of Girion of Dale, and in your hoard is mingled much of the wealth of his halls and towns, which old Smaug stole. Is not that a matter of which we may speak? Further in his last battle Smaug destroyed the dwellings of the men of Esgaroth, and I am yet the servant of their Master. I would speak for him and ask whether you have no thought for the sorrow and misery of his people. they aided you in your distress, and in recompense you have thus far brought ruin only, though doubtless undesigned."
Now these were fair words and true, if proudly and grimly spoken; and Bilbo thought that Thorin would at once admit what justice was in them. He did not, of course, expect that any one would remember that it was he who discovered all by himself the dragon's weak spot; and that was just as well, for no one ever did. But also he did not reckon with the power that gold has upon which a dragon has long brooded, nor with dwarvish hearts. (15.41-42)
Bard lays out his case pretty clearly for why his people deserve some of Thorin's treasure. What rational arguments does Thorin use to try and rebut Bard's points? How does Thorin try and make his case for the morality of hoarding his treasure? If Thorin plans to keep his treasure anyway, why does he make a show of listening to Bard at all?
"But how is it yours to give?" [Bard] asked at last with an effort.
"O well!" said the hobbit uncomfortably. "It isn't exactly; but, well, I am willing to let it stand against all my claim, don't you know. I may be a burglar – or so they say: personally I never really felt like one – but I am an honest one, I hope, more or less. Anyway I am going back now, and the dwarves can do what they like to me. I hope you will find it useful." (16.38-9).
In a sense, Bilbo is the worst burglar ever because he's too moral to keep anything he steals. He is willing to let the Arkenstone go to Bard so that Bard can negotiate for "all of [Bilbo's] claim" on Thorin's treasure. (Dain does, in fact, honor this deal, so that one-fourteenth of Thorin's treasure goes to Bard after his death.) How do the dwarves and Gandalf decide that burglary is what Bilbo would be good at? What seems to be the job description for a burglar, according to the dwarves?
So began a battle that none had expected; and it was called the Battle of the Five Armies, and it was very terrible. Upon one side were the Goblins and the Wild Wolves, and upon the other were Elves and Men and Dwarves. (17.44)
The goblins and wild wolves (a.k.a. Wargs) are so evil that the good and basically decent peoples – men, elves, and dwarves – agree without hesitation to band together. It must be nice having such an easily defined, obviously wicked enemy to fight against. When you start grouping these characters into good and bad races, their loyalties are much easier to identify. Thus, the morality of Tolkien's novels seems difficult to apply in the real world.
But the [Elvenking] reckoned without the dwarves. The knowledge that the Arkenstone was in the hands of the besiegers burned in their thoughts; also they guessed the hesitation of Bard and his friends, and resolved to strike while they debated.
Suddenly without a signal [the dwarves] sprang silently forward to attack. Bows twanged and arrows whistled; battle was about to be joined. (17.39)
Dain, Thorin's cousin, is actually willing to ambush the elf and human armies just so he can get to his cousin in the Lonely Mountain. We have discussed that the dwarves seem to operate in a moral grey area that the elves do not seem to share – would Tolkien's elves be capable of this kind of treachery? What do you think would have happened at this stage if Gandalf hadn't suddenly called a halt because the goblins are coming?
"It will not be long now," thought Bilbo, "before the goblins win the Gate, and we are all slaughtered or driven down and captured. Really it is enough to make one weep, after all one has gone through. I would rather old Smaug had been left with all the wretched treasure, than that these vile creatures should get it, and poor old Bombur, and Balin and Fili and Kili and all the rest come to a bad end; and Bard too, and the Lake-men and the merry elves. Misery me! I have heard songs of many battles, and I have always understood that defeat may be glorious. It seems very uncomfortable, not to say distressing. I wish I was well out of it." (17.62)
Perhaps one reason why our hero Bilbo stays on the sidelines of the Battle of Five Armies is to show how un-glorious battle really is: unlike the people in the midst of the fighting, Bilbo has the space and time to realize that war is "very uncomfortable, not to say distressing." Even if his friends are fighting on the right side, that's not much comfort when he begins to think of the cost in lives.
"I beg of you," said Bilbo stammering and standing on one foot, "to accept this gift!" and he brought out a necklace of silver and pearls that Dain had given him at their parting.
"In what way have I earned such a gift, O hobbit?" said the king. "Well, er, I thought, don't you know," said Bilbo rather confused, "that, er, some little return should be made for your, er, hospitality. I mean even a burglar has his feelings. I have drunk much of your wine and eaten much of your bread." "I will take your gift, O Bilbo the Magnificent," said the king gravely. (18.46-9)
Bilbo's moral code is incredibly rigid when it comes to payment: if he has received a service or profited off somebody, he has to pay for it. It's not just the Elvenking; he also leaves the stolen keys with the drunken guard in the Elvenking's dungeons so the poor guy doesn't come in for too much criticism. Perhaps this strong moral understanding of the importance of payment is why Bilbo is so reluctant to accept much treasure?