Federal law forces unions to represent all workers in a bargaining unit. You can choose not to pay anything in most states. In the rest, you are forced to pay an "agency fee" for the services the union is forced to provide you.
> Federal law forces unions to represent all workers in a bargaining unit.
This is true but misleading. Unions can define their bargaining unit as they choose. It is perfectly legal for a union to decide that its bargaining unit consists only of members (ie, people who have signed up for the union and have paid dues to it). That is exactly how unions work in almost every other OECD country, and which is why employees in countries like Germany, the UK, or France often have the choice of which union they want to represent them at their current job (or the choice not to be represented by a third party at all).
In the US, the main labor union syndicates (AFL-CIO, UAW, Teamsters, etc.) have all decided not to pursue this, instead only forming unions when they can get enough support to unionize all employees in a given class.
> You can choose not to pay anything in most states.
Technically true (27 of 50 states), but the main hubs for tech workers are basically all in states where this is not true (California, Oregon, Washington, New York, Massachusetts, Colorado, Illinois, etc).