TITLE: Why does passage to DG categories cure non-locality of derived categories?
QUESTION [10 upvotes]: In the famous book 'Residues and duality', the author notes that one of the principal difficulties in constructing the exceptional inverse image functor $f^{!}$ is that the derived category of quasicoherent sheaves is not a local object. In order to resolve this difficulty, the author first defines it for residual complexes, a procedure he finds 'clumsy' and 'roundabout'.
In his notes on Geometric Langlands, D. Gaitsgory forcefully explains the necessity of considering DG enhancements to define the derived category for general prestacks

The problem is that the gluing procedure alluded to above, is not defined for triangulated categories. (This was the problem that Hartshorne had to confront in his “Residues and duality”; this is why that book is so thick, instead of being just 10 pages long.)
  Now, the advatnage of the ∞-category language is that gluing can be defined for DG-categories.

Is there a high-level explanation as for why the difficulties occuring while trying to glue derived categories (as triangulated categories) are resolved if we pass to DG categories? In other words, how could someone trying to solve this problem come up with the idea to introduce DG enhancements?

REPLY [4 votes]: Just a quick answer :-)
Triangulated categories lack intrinsicness (is that even a word?), and also the 2-category of triangulated categories is extremely poorly behaved, whereas the 2-category of DG-categories behaves better under 2-categorical constructions (it admits several shapes of 2-co/limits and bi-co/limits).
There is a notion of DG-accessible and DG-presentable category, whereas no (interesting) triangulated category whatsoever can be accessible (they can't be concrete categories).
The 2-category of DG-categories cures the non-functoriality of the cone construction by defining $Cone(f)$ as a suitable weighted colimit (and the weight is essentially the additive analogue of a topological cone construction). There is no such thing in the triangulated world.