We really, really don't want that in tech. Tech is one of the few segments of the economy where skill trumps credentials and connections for people entering the field. As a result, tech benefits from a lot of talent that would be ignored by more traditional methods of filtering candidates.
And what would tech workers gain? Unions don't stop layoffs -- look at the past few decades in the auto industry for proof. Unions would also negotiate standard pay packages that might be attractive to low performers, but would hold high performers back. Plus, severance packages are already legally mandated for layoffs in the places where the majority of tech workers live.