Michael Munger gives an intro to the theory of the firm, which answers the question “If markets are so great, why are there firms?”

This is a topic I’ve been interested in exploring for a whole, but I am not sure what the best resource is. The Nature of the Firm seems like a relatively good resource, but it appears to be largely a collection of essays by Coase and others. I am suspicious of primary sources as resources for learning. It seems doubtful that even after quite a long time and significant  theoretical developments the original essays would be the best at explaining the concepts. I would prefer a book which has more synthesis and empirical evaluation of the different theories of the firm.