Both The Lord of the Rings and The Hobbit dealt with some pretty heavy subject matter. Bilbo Baggins once told his nephew, "It's a dangerous business, Frodo, going out your door." And Bilbo was exactly right. Gandalf chose him to go on a dragon-killing adventure, complete with a massive battle between five armies and the heartbreaking loss of several companions. Then, Frodo battled countless foes and endured numerous trials on his way to saving all of Middle-earth from the threat of Sauron and his Ruling Ring. In the process, he suffered wounds and trauma that never truly healed — including the loss of his finger — and ultimately departed Middle-earth to find peace amid the Grey Havens. Tolkien himself was a veteran of World War I, and his experiences there informed his fantasy epic in countless ways, lending it a good deal of tragedy as well as the sad wisdom that some evils never truly die.
Source:https://www.cbr.com/lord-of-the-rings-blue-wizard-scene-legal-loophole/