I get it when an organization outsources something when they don't have enough work to sustain a team. Like a small town government isn't going to operate their own roof repair division just to repair government roofs (rooves?), you instead would hire a local contractor that has plenty of private work to keep their crew busy.
But some things the government does all the time and it doesn't make sense to outsource, like most office work. Of course outsourcing some temp staff can be practical if one can anticipate things like seasonable demand, but hiring local students if the job and time frame fit (summer job) is better still.
At the end of the day an organization can pay an employee, work out benefits, etc. Or it can pay a for-profit business to take a cut for management, owners, etc and try to cut corners on quality or benefits for the employees. I know how the neoliberal "third way" think, and they'd rather reduce the number of government employees, even if that amounts to giving taxpayer dollars to a private owner and gutting good paying union jobs in the community. It's no wonder the working class is struggling under skyrocketing housing prices, high tuition, and low wages. It's all symptoms of an unhealthy economic system that is the direct result of our political shift in both parties in the US. (and a general trend in much of the West with neoliberalism, especially the anglosphere)