Firstly, unions prevent abuse. This includes unjust termination (for a million different reasons), handles disputes with supervisors where the individual employee otherwise has no power, such as the HN post the other day about the extremely abusive Apple team, or the many things we hear about sexism and racism. On HN and reddit, every time we talk about these issues the comments are always "find a new job", "don't bother with hr", "hr is not your friend". With a union, the union IS your friend and they make it so you DON'T have to find a new job. For devs, with our extremely painful and broken interviewing process, this is great.
Second, they negotiate for higher wages and benefits. Given that tech is churning out billionaire ceos, we certainly could be paid more. I have never met a dev who said "I don't want to be paid more". Yes, we make decent wages, but we still produce far more value than what we're paid for.
Thirdly, they negotiate for better working conditions. Examples from the past were things like the 8 hour workday, safety measures, etc. I suspect there's a lot of opportunity for growth here in the tech industry, through I haven't had enough coffee to come up with a list. The 8 hour workday is certainly one of them, as I've heard endless nightmares of people being forced to working extremely long hours. The lack of overtime in our industry is a big deal, and "get a new job" is a crappy answer and hard to do in practice, especially if you're being worked to death.