Here’s an interesting term I ran across today:  yak shaving.

(idiomatic) Any apparently useless activity which, by allowing you to overcome intermediate difficulties, allows you to solve a larger problem.

I also like the phrase that appers in the See also section, “when you’re up to your neck in alligators, it’s easy to forget that the initial objective was to drain the swamp.”