Right. Github is located in a civilized country that also has unions and employment law. Unions aren't active in every company, and not active in most for that matter. Gender discrimination and harassment is illegal pretty much everywhere if not everywhere in the US. IANAL and I'm not going to go check all of the jurisdictions to confirm.
Everyone who has an opinion about unions seems to have a strong one. My own was formed at my first job where I made around $4/hour and got 1.5x overtime over 40 hours. The union guys got a lot more than that, though in fairness they were experienced and I was a kid, so "more" was quite reasonable. They got overtime and double overtime (3x base rate, or what they called "golden time") if they worked something like > 12 hours in a day, which happened from time to time. None of that really bothered me. Obviously, they just negotiated from a stronger position.
What bothered me was that they could spend a significant amount of that time just sitting on their butts and no one could do a thing about it. They had a "supervisor" who literally sat in a car all day long "supervising". Eventually, the company managed to get rid of that particular leech and just made one of the regular guys a shift lead or some such, and we got along just fine. The leech's parting words of advice to me were to find a job that paid a lot where I didn't have to do anything. In other words, do exactly what he had done. And then there's seniority. With a union, it doesn't matter if you're any good at your job or not, the only question is how long you've been there. Unions, in my experience, promote mediocrity. Oh, and then there's double dipping. Our work was primarily moving freight from one mode of transport to another. Typically from a ship to a train or truck. One of the enterprising union guys figured out how to sign up to work two ships at a time and only show up for one. He got paid for both. It was widely known that he was doing this, but no one could fire him for what amounted to blatant fraud. Maybe it's more precise to say it wasn't worth the fight with the union to get rid of the guy. Those instances of brazen exploitation turned me off unions.
Unions do have their place. When employers are abusing the workers, unions can back them off. Unions have enough power, though, that they can also screw over the employers AND the employees, and unchecked, they do.