When people go to grad school, then during their studentship get married and have a kid -- suddenly their productivity goes up dramatically and output per time increases by many factors. What happened?
It turns out when you have self-motivating reasons to get out (and a target on your head from your spouse to earn some money for godssake), you find ways to focus on what's important and drop the rest.
No more idling away for hours on silly ideas that don't get you closer to handing in your thesis. No more trying random libraries that get your code to run 2% faster. No more goofing around after 6pm with other students just because you have the time -- you have to get home and be a breadwinner for your family. You have to get shit done.
You start to ask, "even if I don't know exactly what the thesis will say, how should it be organized and what kinds of conclusions will make up the writing? And what experiments do I need to fill in those charts/paragraphs, and no more?" What's the minimum I need to do to get out of here? Not, "What amazing interesting thing could I explore?"
Limits and constraints sometimes free the mind dramatically. The side effect is maybe you don't get to explore ideas that go nowhere, but that's a discussion about the purpose of the PhD and for another topic I guess.
(And sometimes, if you think, well I don't have a kid, so what's the rush? Well, someday you might have a spouse, a kid, and every day of time you left in grad school is a day for your future self -- and family -- and $$ -- left behind in time. Work to free your future self... now, while you have the time.)