Yes it’s unbelievable that companies don’t mind paying much higher wages to agencies rather than their own direct employees, and the fees as well👐.
It's not. Direct employees incur extra costs on the company - Employers National Insurance (13.8%), (admin of) Employees National Insurance, (admin of) Employees PAYE and Employees Pension contributions (3% minimum) to name a few. All these have to be paid by the company directly to HMRC or the Pension company, which puts a liability on the company. There is also sick pay and holiday pay, plus potentially redundancy pay if you want to terminate some ones employment.
So for a headline salary of say £30K it could easily cost the company another £5-10K to employ someone. If you can farm all that responsibility out to a subcontractor/agency for sub £35-40K then you'll be in profit, and if things go south you can 'sack' the subby/agency with little comeback. If you get a good subby, and business is going well, then you can bring them onto the payroll.