> contractual obligation
In what country? In the US, most are mandated by law. All government jobs are union, regardless of the wishes of the worker.
Contracts are mutually consented to. If it's a union job, you have to be a part of the union. How is forcing workers to do something they do not want beneficial?
I'm all for unions where someone can join and leave freely without the threat of force or loss of work. Do we have that in the US? No.