In Sweden, students and graduate students are well-organized/unionized, but the situation for PostDocs and other post-doctoral fixed-term employed academics is dire nonetheless, in particular for immigrants, for whom the fixed-term contracts cause problems with their residence permits, considering recent changes in immigration laws.
And recent changes by the government have actually made it worse. The irony is that the unions have been campaigning for these changes. It's really weird how unions think that requiring that postdocs must get a permanent position after 4 years would somehow lead to them getting those positions, while there is no more funding from the government, so no permanent positions are being created. I mean in our department academic faculty have to find 50% of their salary plus ~80% overhead from external funding. Really universities in Sweden tend to be more like research hotels, with lots of regulations that you have to follow.
It's not weird at all, considering where the unions are coming from. This is from Finland and from 10+ years ago, but from what I remember, the Swedish way of thinking was similar.
According to the spirit of the law, all jobs are permanent by default. Fixed-term positions require a valid reason. A project (such as completing a PhD) is a valid reason. The availability of funding is not. While an externally funded research project could be considered a project, it's reasonable to assume that someone in the university will apply for funding for similar research in the future. Because someone is planning to continue similar projects in the future, the need for that particular externally funded researcher does not end when the initial grant runs out. And even if those applications fail, the university still has other money for paying the salary. The employment should continue until the university decides to reduce the number of people doing that kind of research permanently.
In principle, it should be categorically illegal to hire fixed-term postdocs, but the academia does not work like that. Because the union is a union first and a representative of specific people only after that, it's extremely unwilling to let go of the "all jobs are permanent by default" principle. There must be a compromise that allows the international standard practice of hiring postdocs for a few years without letting the employer to chain fixed-term positions indefinitely. Whether 4 years is a good compromise is debatable, but it's easy to see why a union would want something like that.
Also, from a Finnish perspective, Sweden has a reputation as a country where it's relatively easy to get a permanent academic position.