Wages are only part of the function of a union. An arguably more important part is preventing arbitrary and capricious management decisions, including retribution against employees for expressing grievances. A big part of what unions do day-in, day-out, is dispute resolution. A unionized meat factory isn't going to pay much better wages, if at all, than a non-unionized factory; but it would be significantly safer.
The thing is, the courts often grant Due Process protections to government employees on the theory that a government employer taking actions against an employee isn't too far removed from the government taking actions against any random citizen. At a minimum, the government almost always must follow some sort of reviewable investigatory procedure. Compared to at-will employment, the burden (however de minimis in an absolute sense) is much greater. The need for checks against malicious government managers is significantly reduced.
The upshot is that unions aren't as necessary in the case of government employees. The downshot is that even if you prevented unionization, the government would still have problems firing problematic employees. The issue is never that they can't be fired (union or not), but whether it's worth the hassle, which has a cost in terms of time & money.