A lot of work we do everyday are “Yak Shaving” jobs.
yak shaving [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.
In programming, some subroutines can be seen as yak shaving. Looking at my time in the office, a lot of time got spent on yak shaving. Some of them necessary, and many of them unnecessary. Unfortunately, before you do it, you don’t know whether a particular job is necessary or not necessary.