IIRC, hiring the burglar was Gandalf’s idea:
“You asked me to find the fourteenth man for your expedition, and I chose Mr. Baggins. Just let any one say I chose the wrong man or the wrong house, and you can stop at thirteen and”
“warriors are busy fighting one another in distant lands, and in this neighbourhood heroes are scarce, or simply lot to be found. Swords in these parts are mostly blunt, and axes are used for trees, and shields as cradles or dish-covers; and dragons are comfortably far-off (and therefore legendary). That is why I settled on burglary-especially when I remembered the existence of a Side-door”
As it stands, it was a good idea because with their limited numbers, the only way they could have done something was to find a way to sneak in and do it stealthily.
The dwarves’ descriptions of the Great Hall and the Mountain before Smaug told me what they really wanted was to reclaim their home. Even when Thorin recites the tale of Smaug’s predations to Bilbo and says they have not forgotten their stolen treasure, he says
“And even now, when I will allow we have a good bit laid by and are not so badly off"-here Thorin stroked the gold chain round his neck-"we still mean to get it back, and to bring our curses home to Smaug-if we can.”
To me, the gold was always the kind of excuse or rationalization that guys give themselves when they don’t want to admit they are motivated by sentiment.
“They debated long on what was to be done, but they could think of no way of getting rid of Smaug -- which had always been a weak point in their plans, as Bilbo felt inclined to point out.
When the dwarves are perplexed about what to do, they grumble and Bilbo responds,
“Did you expect me to trot back with the whole hoard of Thror on my back?”
Indeed, that very point is probably why I have always felt their real objective was revenge and to somehow deal with Smaug. There was just no way they could cart away Thror’s treasure with just 13 or 14 bodies.
Indeed, Smaug’s discussion with Bilbo brings up this point and Bilbo responds,
“I tell you," he said, in an effort to remain loyal to his friends and to keep his end up, "that gold was only an afterthought with us. We came over hill and under hill, by wave and wind, for Revenge.”