That's a logical thing for governments to do. Governments are under pressure on different axes than the companies they contract to do things. Governments switching contracts won't ever make the news, but it's much harder for them to fire people in order to take advantage of increasing efficiencies. Likewise, they cannot short-term employ people easily without this structure.
I think there's a reasonable argument to be made that if the civil service doesn't have a decent amount of technically proficient people on staff, that they can't know what's possible - You just end up with a hollowed-out political class that has no idea what they're out-sourcing, and can't learn lessons post-project.
In most cases its illegal to set up something inside the public org. It needs to be put out as a public offer. It's part of New public management pushed by neoliberal interests.