Why? It's part ego ("look everybody, look what a grand building I'm capable of creating!"), part autodidactism (learning new things feels as good to me as sex), and part perfectionism (I'm happy to spend 90 minutes formatting and copyediting a document, when 10 minutes is all that's called for).
Regardless of motivation, the fact is: MY EMPLOYER ONLY WANTS TO PAY FOR A THREE-STORY BUILDING. When I build a 20-story building, and I do it on the clock, I'm forcing my employer to foot the bill for something they never asked for.
Nonetheless, I constantly go off on little side excursions, working hard on things that are related to my current task, but are nonetheless not at all required to complete my current task.
I must stop conflating tangential-work with real work in my mind. Confusing the two is procrastinating, there's no two ways about it.
Once in a while, it may be judicious to automate a particular task. However, when I am in the throes of this compulsion, it is difficult/impossible for me to make the right decision most of the time. In this case, it is much safer to assume that NO task should be automated.
After I've proven, over several weeks or more, that I'm capable of controlling this compulsion, then I can probably reevaluate. In this middle of the compulsion though, I have to have strict rules.
The catch-phrase for this is "technological asceticism" — while it might be more comfortable to do your task if you had a bunch of automated tools, those tools are by no means necessary. You're perfectly capable of doing it the "old fashioned" way, even if that means some repetitive manual work.