Actually the title is a fact. What is alleged is the reason. It is a fact that the engineers seeking to organize were fired. And they are alleging that it is because they tried to organize. But it is still a fact that the ones who tried were fired.
Then “SF company Lanetix lays off engineers, union alleges illegally” would be a fair headline. (The original headline here did not include “, union claims”.)
The title has now changed since I saw it. I don't remember exactly what it said before, but I remember it saying something like "fired software engineers for seeking to unionize".
I'll admit it's possible I misread it and the "for" wasn't actually in there.