Every large organisation I've been in operates in silos, and these firms hide within these silos. Also, these firms have a bad reputation - everyone in banking knows it, yet they are still employed because they're cheap and let you add bodies to the shop floor when funding is squeezed. That makes managers look powerful with big empires, which helps getting promoted. So it's not all about code quality or productivity - sometimes it's just about looking like you're getting stuff done, before you leave and let someone else inherit the mess.
Okay, lets assume that this is happening. I would hope that the person harming their own business by willfully engaging with an incompetent third party is the one at fault here.
The thing is, it's not their business. They just show that they saved money and get promoted on to another role. The mess, when it becomes apparent, is for someone else to clean up...
Okay then they are a dishonest toxic employee. The way to solve that is by trying to weed out such people in your hiring, and do due diligence on their previous employment record. I fail to see how that changes my conclusion.
This won't work, because those employees don't actually register as toxic for the company - au contraire: They have reached - and quite possibly exceeded - their predefined performance targets! They have done exactly what they were hired for.
You have to realize that things like long-term quality, or even reducing total costs for the company (only the silo is important!) is not a performance target in this scenario, and that's the root of the problem.
It's a systemic problem, a problem of corporate structure and incentives, and exactly the ecosystem where these kinds of contractors thrive.