I used to work at a big company's inhouse development. We had many developers coming from either consultancies or agencies.
The department and the developers would have been happy to cut out the middle man but policy dictated using the agencies.
In my opinion it has to do with the people making up the rules thinking of developers as interchangeable. So they want a contract with a firm, stating that this firm will provide a developer with skill X for duration Y.