Government can certainly create the appearance of new jobs by spending. The minister can be televised proudly cutting the tape to open a government-funded business employing 100 people. The problem is that government has to take that money from the private sector in order to do so. It can do so by taxation, inflation or borrowing, and the effect is to give the private sector less money to spend. That, in turn, means lower demand for its goods and services, less economic activity and fewer transactions. The net result is that jobs are lost in the private sector as a result. Part of the political problem is that the government-funded jobs can be seen, with ministers taking credit. The private job losses take place quietly, without people realizing that they are the result of government activity.
There has been much discussion in academic circles as to whether the publicly-funded jobs gained are more or fewer than the private sector jobs lost, but there is a respectable literature to suggest that they are fewer, and that 100 jobs created with public money will result in more than 100 jobs disappearing or not happening in the private sector.
Another part of the problem is that government-funded jobs are created in accord with political rather than economic priorities. The projects sanctioned are those that find favour with ministers, rather than those created to meet demand. They can be done to court electoral popularity rather than to satisfy economic needs. Jobs funded by public money often need public money to sustain them afterwards, and risk disappearing if public subsidy is withdrawn at some stage in the future. Governments are notoriously bad at "picking winners" to support with public funds; it is not their own money they are putting at risk, so they are less likely to do cautious and full accounting. Private investors tend to be more hard-headed since they stand to incur any losses that come about.