"But no doubt it was designed and built by people who do everything they can to avoid tax and national insurance through IR35 and other scams."
Do I detect someone who doesn't have the confidence in their ability to succeed as a freelance themselves but still wants to criticise those who do whilst drawing a nice reliable salary?
Well, don't worry if that's you, the freelancers will look after you.
You see, your employers have a problem. They have busy spells with lots of requirements and periods when they don't and they can't afford to staff for peak demand with permies and then pay them for nothing when work is slack. They have to match such fluctuations with those due to permies leaving, going off sick, going on holiday and taking parental leave. They may also require specialist skills at short notice that their permies don't have.
Fortunately they have the fall-back of freelancers who are prepared to operate as a business to take the risks of short term engagements and get taxed as a business and so smooth everything out. The freelancers keep your employers in the game so that they can afford to keep employing those permies who just want a risk free life and yet don't see why anyone taking the risks should be treated differently. The alternative, of course, is that your employers could just get shut of you and outsource their entire IT to the lowest bidder.
In the context of the current topic HMRC's problem might well be that their attitude has lost them the freelancers they were relying on to build the system. It's another case of having their cake (not carrying the costs and risks of having enough IT employees and relying on freelancers instead) whilst trying to eat it (attempting to tax the freelancers as if they were the employees they don't want to pay).