Unions can't (always) make an unprofitable company profitable, but they can prevent fake layoffs that aren't actually warranted by the company's economic condition, like the kind the article is talking about.
Indeed, I think their major trick (in America, anyway) is to make a profitable company unprofitable. Much like the bad forms of private equity from above, they bleed a business dry from below.