Thought it was mandatory. Some of my friends who were in some jobs even if they don’t join the union they have to pay the dues anyway.
I believe the SCOTUS said that was no longer legal. Of course that doesn’t stop the left from doing it anyway.