Replace "serve" with "control" and you have the problem.
Most things the government needs to do, computer science alone cannot solve. A program might make the administration of taxes and benefits better, but it alone won't provide those benefits or compel the payment of taxes. A program might help in military planning but it can't fight wars. It might help the provision of fire, police and ambulance services, but there's still people who need to do all those things.
And when automation fully takes over a sector, computer science won't solve the problem of what to do with thousands of laid off workers and the growing income inequality that results. Smart tech entrepreneurs are looking at universal basic income to distribute wealth more broadly. If technology creates a handful of billionaires and millions of people living precarious and poor lives, that won't last for long.