In that case at least
a) There's no need to pay extra for the profit margins of the contractor companies (and the inevitable sub-contractors they use)
and
b) The incentives of the people doing the work are likely to be closer to the original project, in that the people doing the work are in the same organization as the project.
For me, outsourcing makes sense if the organization doesn't have enough of the specific type of work to have a fully staffed internal team, so specialist services, or if they are obliged to get an external opinion (e.g. auditing/pen testing). Otherwise you're just adding more layers of profit seeking middle-people...
I'm not so sure about incentives. The incentives aren't necessarily great in either situation. See also https://en.wikipedia.org/wiki/Public_choice
The Apollo program was run by NASA, who had lots of government employees, but at the same time all the hardware and much of the software was built by contractors. The Apollo program was behind schedule and over budget for most of the project period.
NASA originally estimated the cost to somewhere between 7 and 12 billion USD; NASA Administrator increased this to 20 billion USD in 1961, but it ended up costing more than 25 billion USD in 1973 dollars.
Have a look at eg the outsourced Danish firefighters. Seems to work just fine, but would be unthinkable in most countries, including the US. (Btw, Americans have more firefighters per capita than about anywhere else.)