A few basic reasons:
* You can't do it in-house as well as a contractor who specializes in this field, or as well as this particular contractor. Very broadly speaking, the best people in field X want to work for themselves, do things their way, and keep the revenue from their work. They don't want to be several layers deep in management at your company, to have f-ng morons (i.e., anyone else) telling them how to do their job, and to be paid a salary for the breathtaking, save-the-day miracles they routinely output.
* It's not worth the investment: You would have to find and hire talent, ramp up, provide resources to them (equipment, training, etc.), be able to manage the talent in a field that isn't your expertise, and keep them busy and interested. Maybe you don't have enough scale in the things they do to support quality resources; maybe you just don't have enough work or enough interesting work for them.
* Every additional employee or capability is a distraction for the organization, including management. Keep focused on the things you do best and that are strategically important; you don't even have time for that. If you're small restaurant chain, IT isn't strategically important - it just has to be reliable and good enough. Outsource it and focus on world-beating food, service, and marketing.
* You don't want to pay benefits, taxes, or have the other responsibilities of being an employer. See: Uber.
* Sometimes it's just politics: I once worked in an outsourced capacity for a company where the IT manager simply didn't want to invest in a technology that would threaten their fiefdom, so somebody brought in a contractor. It was not a fun place to be.
1. You can get a functioning team much more quickly.
2. It's a lot easier for someone unfamiliar with the field in question to evaluate the quality of a consulting company than to evaluate a prospective hire.
3. It's a lot easier to get rid of them once you don't need them anymore.
This is in contrast to employment consultants getting fees in intervals over a period of a person's time with an employer, usually done for executive positions. So I'd say optimise your agreements with contracting firms for quality rather than quantity by paying them bonuses in intervals, with a low initial payment for the finding the candidate.