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](https://a42663fe-a-62cb3a1a-s-sites.googlegroups.com/site/geometriclanglands2014/notes/RoadMap%28I.1%29.pdf?attachauth=ANoY7creWDM2Fo8Wuy-Gfs4xz-kFUSeQzN6WE5RCc9kfb46xCvIoifJTZuwLEwNFS-UFYCTZdO5qZvwQvreR0FlMTZBUVB83XmsTVkf-Sb2z1PvJpbs4Al8TJlvnrsOWS8WVwwyDCQIiiV8r8Efz1sqr7Y48SH5SV1g8RT5-1kawhLCZfWGtPAgObrKkGFGSaennNQAvhi2oa_pGc6FUlzw6x17JPD7KYkPcDmwT6X8WVebnjQRQwyLy6XVMTJukLXOqQ-ZZOgsQ&attredirects=0) 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?



Why does passage to DG categories cure non-locality of derived categories?
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](https://arxiv.org/abs/1704.00303)).


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.


