So, the real questions are: a) what work is staying in-house; and b) what can firms do about it to maximize profits.
First, the kind of work that is staying in-house is not high-level analysis, but rather more high-volume (repeatable) work. Notably, they are keeping inside the lower-level document review work as it pertains to litigation, due diligence and compliance. That work can easily be monitored in-house. Frankly, folks like me (director of a contract attorney agency) are increasing convincing in-house counsel that several types of work can be done far more economically (and frankly BETTER) by a contract legal force, than by their white-shoe law firms.
Second, law firms can capture some of that work by utilizing contract agencies themselves. That way they: 1) keep more control over more of the work; 2) still get to save their clients money without sacrificing their partners' A-rates; and 3) get to minimize their own overhead and expand their own reach by being able to take on larger projects than every before--without committing to great numbers of associates.
All you need now is a reputable, professional agency that actually screens its folks and takes an aggressive role in making projects actually work smoothly.