In the original yak shaving story, every next step was not an optional distraction but was a prerequisite to doing the previous thing; often caused by 'tech debt' (e.g. the protagonist couldn't borrow the tool you needed from your neighbor because he hadn't fulfilled an earlier obligation, and needed the yak hair to do that)
> [MIT AI Lab, after 2000: orig. probably from a Ren & Stimpy episode.] Any seemingly pointless activity which is actually necessary to solve a problem which solves a problem which, several levels of recursion later, solves the real problem you're working on.
So yeah, both in your first link (mostly) and here: prerequisite - something you have to do, not a side thing like the clip of Hal. That GIF has apparently been misused this whole time, muddying the issue.
(The first link ends with the equivalent of "you can avoid yak shaving by introducing technical debt")