Companies benefit by taking as much of the profit for themselves as possible, rather than doing right by their workers. Some of that pressure comes from VCs or shareholders, but even in private companies it takes a rare founder to put a worker's interests ahead of their own.
Tech companies can afford to be more vocal about it because a significant number - arguably, the majority - of their employees genuinely believe that they would do worse with unions (regardless of whether it's actually true).
I think at least in part this is because much of tech is in US, which has widespread "temporarily embarrassed millionaire" syndrome in general, but especially so in tech.
I think this is changing though. There’s a lot of people working in tech and with the kind of abuse that’s been reported (ahem, Amazon) we might see that change.