These two things are linked in my opinion. Tolkien created a world and didn't have anything to do with it, so he wrote The Hobbit and Lord of the Rings. It's a miracle that Tolkien put all his world building to good use. Wait, did I say "all", I met most. I think Tolkien created Tom Bombadil but didn't know what to do with him. There is nothing wrong with Tom Bombadil as a character but he doesn't advance the Lord of the Ring story in any way. At least as far as I can see, and other Tolkien fans agree with me. Though if you disagree, I don't think you are a bad person. Let's talk about Rowling and George R. Martin. Rowling has characters she created and liked that she cut out of early drafts because they didn't advance the story. I couldn't finish book 4 of Song of Ice and Fire. I would argue that each book was less good than the last. Because George R. Martin keeps adding extraneous details. I'm a guy who loves making extraneous details. I have a massive website feeding my obsession for extraneous details but when I write a story I try to keep the details lean.
there's a limit to the number of sub-plots and spin-offs you can insert in a story. Martin surpassed it long ago, and probably because it was no more interested in complete the story... i fear because he himself is without any idea to how effectively wrap and close all the opened storilines. As a result, i'm no more interested in the saga. At least, Tom Bombadil may be of no use to the plot advancement, but his appearance was limited to a small portion of the story and caused no harm.
Pretty sure Tom Bombadil is there just to be an early-story Deus Ex Machina. I vaguely recall reading somewhere that Middle Earth was meant to be a role-playing game setting, which would make Bombadil a quick-save figure for a low level party in over its head.
WHHAAAAA! Dungeons and Dragons was basically the first tabletop RPG and debuted in 1974. Tolkien died in 1973 and the Fellowship of the Ring was published in 1954. That being said, "Deus ex Machina" predate tabletop RPGs being a term used in Ancient Greek and Roman plays. The "modern" use of deus ex machina saving the protagonists from otherwise certain doom was supposedly coined in the 1800s.
Contrary to popular belief, Dungeons and Dragons was not the first tabletop RPG. It was the first well publicized and widespread one, but it was NOT the first. There are similar systems dating back to the 50's.
Even then, the term "Deus ex Machina" predates table top RPGs. Most people know who Henry Ford was. Few know who was the first person to make an automobile. Supposedly it was Karl Benz but that is often disputed.