Bilbo knew that if he didn't give the arkenstone to the towns people and the Elves a war would have started and he couldn’t live with that because he knew that Thorin would regret it. Bilbo knew that Thorin would hate him so much that he would probably kill for going behind his back and giving the arkenstone away a probably hate him even more just because he gave it to elves and dwarves and elves don’t get along at all but Bilbo was willing to risk his friendship and his life to prevent thousands of Elves, people and children's lives getting take away because of one dwarves mistake.
Knowing that Thorin would go to war unless he had a good reason to stop Bilbo gave the arkenstone to the people of lake town and the elves. When Bilbo gave the arkenstone to the woodland elves king and Bard the man that killed the dragon Gandalf said that Bilbo did the right thing. Why is Gandalfs opinion so Important? His opinion is Important because Gandalf is a great wizard and knows a lot of things that Bilbo doesn't Gandalf is also very smart and a good friend of Bilbo’s so his opinion is very important to