As one great example of productive rabbit-holing, Knuth was frustrated by the computer-typesetting tools available to write a computer science book, so he wrote TeX; and then there weren't good fonts for it so he started designing one; but he needed a font-designing tool so he wrote METAFONT; etc. Eventually he got back to his book.
But he was: 1) already a tenured professor at the time; and 2) had a sabbatical year in the middle as well. So he was able to choose to delay one kind of productivity to follow this other rabbit hole instead, and ultimately probably end up more productive as a result. The normal productive solution, of course, would've been to just muddle through with whatever typesetting system his publisher was using, and stay focused on the book.
But he was: 1) already a tenured professor at the time; and 2) had a sabbatical year in the middle as well. So he was able to choose to delay one kind of productivity to follow this other rabbit hole instead, and ultimately probably end up more productive as a result. The normal productive solution, of course, would've been to just muddle through with whatever typesetting system his publisher was using, and stay focused on the book.