Barbarius quoted Bored and Brilliant by Manoush Zomorodi
You could say that boredom is an incubator for brilliance. It's the messy, uncomfortable, confusing, frustrating place one has to occupy for a while before finally coming up with the winning equation or formula. This narrative has been repeated many, many times. The Hobbit was conceived when J.R.R. Tolkien, a professor at Oxford, "got an enormous pile of exam papers there and was marking school examinations in the summer time, which was very laborious, and unfortunately also boring." When he came upon one exam page a student had left blank, he was overjoyed. "Glorious! Nothing to read," Tolkien told the BBC in 1968. "So I scribbled on it, I can't think why, 'In a hole in the ground there lived a hobbit.'" And so, the opening line of one of the most beloved works of fantasy fiction was born.
— Bored and Brilliant by Manoush Zomorodi (Page 28)
The unlikely beginnings of Middle Earth was because marking sucks.