I often hear this misunderstanding in the US. Of course it's a within the power of a union to hire lawyers who can help defend its members against the cooperation within the rules of the law. In fact, to highly paid employees like tech workers, this kind of legal support is much more valuable than wage negotiation. Having somebody you can reach out to, who know the company well, and don't charge you a lot of money, is super valuable and why I wish more tech companies had unions.
Unions have power because they can negotiate as a group. Those negotiations allow them to do things like get an employment contract for all their members in a company which then affords those members legal rights they would not have under regular employment. If your union doesn't have that legal contract and does not have a practical way to negotiate one then your union only has the power of a larger voice than a single individual and no more legal rights than a single individual at the company does.