From my experience, most public workers are doing the best they can in extremely difficult circumstances.
It’s very common here (the UK) to talk about the ‘feather-bedded public sector’ as if public sector workers are swimming in money and workplace benefits. It is true there are benefits to working in the public sector which are much less common or lower in the private sector.
But some of those benefits are more or less illusory.
For example, most local authorities offer flexi-time to some extent, i.e. in theory an employee can come in when it suits them (within more or less rigid hours specified by their employer), they can take time off in lieu of time worked over their contracted hours, etc.
In practice, actually doing that can be effectively impossible.
Most public workers are covering more than one person’s post and doing significantly more than their contracted hours just to just about keep up on a regular basis (the funding for staff, or well anything, keeps going down but the work required keeps going up) and so actually taking time off in lieu just means they have do even more hours when they get back, so why bother?
Pensions are better but many people are paid so little that they feel they can’t pay in.
As regards incompetence, a lot of what public sector workers do is stuff that no one else does.
As a result it is hard to get competent other than through a career in public service. Since that is the case (and as you say contractors make a lot of money through public contracts), a lot of public sector workers can earn an awful lot more and have a nicer life by learning the ropes in public service and then going into the private sector.
So the public sector provides them with the training and experience and when they have the skills and knowledge, they take it off to the private contractor.
This does not mean that everyone in public service does this or that everyone left in public service is therefore incompetent (amazing as it may seem there are plenty of people who genuinely prefer working in the public sector) but it does mean there are a lot of personnel changes and institutional knowledge disappears.
This is entirely deliberate and leads to your next point:
As people have said above, public bodies having their own staff do public works = evil socialism/depriving hard-working entrepreneurs of the ability to make money, bring “efficiencies”.
It also costs money which politicians like to be able to tell people can be saved instead.
So we have a massive drive towards outsourcing which can be sold as ‘saving money’ (which will still have to be spent, it just goes to a multi-national company, instead of local people) and ‘creating jobs’ (when of course it first destroys jobs and then just shifts jobs around - the same work is still being done).
Just incidentally it also means that there are lots of massive companies around that are suddenly in need of non-executive directors and high level advisers. Jobs that former politicians are somehow just perfect to fill.