In his preface to the second edition of The Lord of the Rings, Tolkien writes:
I cordially dislike allegory in all its manifestations, and have always done so since I grew old and wary enough to detect its presence... I think that many confuse "applicability" with "allegory", but one resides in the freedom of the readers, and the other in the purposed domination of the author.
Particularly after the publication of The Lord of the Rings in the 1950s, many people have assumed that the races of Middle-earth must directly stand for real-life peoples: for example, that the goblins (later, the orcs) represent the German Nazis and so on. However, Tolkien himself has strongly resisted any kind of direct connection between the different races we find in his novels – goblins, dwarves, and so on – and the real nations of the Earth. That said, we still might find a morally problematic message in the fact that all of the races in the world of The Hobbit must behave exactly as they're programmed to do. In other words, it's tough to find a really bad elf. Once an elf becomes bad, it's actually no longer an elf. So where is the free will in Tolkien's universe? Is there any indication that it's possible to overcome genetics in this book?
Questions About Race
What are the different characteristics of good and bad races? Which of The Hobbit's races seem to fall into a morally grey area?
Which characters appear to operate outside of specific racial affiliations (such as dwarf or elf)? Where do these characters come from? What roles do they play in The Hobbit?
How does race determine custom and tradition? What are the traditions and practices of the different races? And how do members of one race tend to respond to the traditions of another?
How does race become a motivator for warfare in The Hobbit? How does it create alliances between individuals? Is there any indication that a character can act against the preferences of his or her race?