I love the book, but you have overlooked something important that few people pick up on. It isn’t a story about heros and villains exactly, it’s a heist through and through.
The hobbit is employed as a burglar, and he is very good at it. The dwarves are going to the lonely mountain, but not to defeat a villain. They are going to steal back a massive pile of treasure. The battle at the end happens because all the different races are running to steal a share of said treasure. This is not good verses evil, it is righteous greed vs malicious greed.
Bard is the most heroic character, a man who risks his life to save his people. Something dwarves, and elves fail to do. Gandalf is the most perplexing. Is he a hero, or a villain?