Tolkien was influenced to write "The Hobbit" due to his desire to create a new mythology.
It is often said that Tolkien wrote "The Hobbit" to entertain his children, but he was actually experimenting with adapting mythology to use in different ways. His mythology is called “Silmarillion” mythology. These are stories from from the First Age of Middle Earth.