I think the concept that "the purpose of a union is to prevent layoffs from ever occurring" is harmful to the movement.
If that is why you want to join a union, you will be disappointed.
If that is why you want to join a union, you will be disappointed.
Anyway, I'm quite sure that that's not the purpose of a union. The purpose of a union is to represent workers interest in order to make sure that workers have fair working conditions. Although in some cases (e.g. police unions in some nations) it has drifted quite far away form that rather simple purpose.
Of course, this could be referring to many things, but tech layoffs are currently making headlines.
Honestly, looking back, my comment reads as a non sequitur, so I apologize for the confusion.