Sometimes it's bikeshedding (looking through color swatches for your navbar when you dont even have a working CRUD system), sometimes it's indirect value add to you or your team (evaluating new ORMs or IDEs), sometimes it's just karma farming in the universe (sending PRs to a new GitHub repo you've found that almost solves your issues...)
I think of it as concentric circles: the center is the goal, the first ring is the tasks you need to complete, and so on ... and yak shaving is anything more than 2 layers away (or outside the circle entirely!)
Consider my example of evaluating ORMs.
Option 1: Blindly choose first ORM from a Google search.
Option 2: spend 2 hours reading reviews, blogs, etc. to compare the 3 most popular ORMs.
Option 3: spend a day spinning up containers for each ORM, testing out a CRUD prototype for each, evaluating some basic cases.
Option 4: spend a week down the deep rabbit hole of ORM internals, query rolling, edge cases at scales your app will never see ...
And everything in between. None of it's necessary - even the ORM itself - but it's not all wasted effort either.
In the story, obviously the guy should return his neighbor's pillow, whether or not he's going to immediately ask for another favor, and he probably ought to get a new hose also. So even if he thinks shaving the yak is way too much trouble to get his car waxed, shouldn't he shave the yak anyway?