As Cal Newport reports in Book - Deep Work.. 3 Rules for Focused Success in a Distracted World, task switching leaves a residue of attention at our last task, costing more attention as a result (scientific citation needed). As shallow work tasks often are short distractions, switching between them and deeper work tasks wastes a lot of unnecessary mental resources.
This phenomenon can also be explained as Unfinished tasks occupy our mind more strongly than finished tasks, but Newport explicitly states that even finished tasks get a bit of attention residue.
This idea could be another argument for Attention is the new gold
This idea is at odds with the idea of interleaved practice presented in make it stick (link missing)