It’s called advocacy. Every union is like that - it’s similar to being the union member’s lawyer (and often involves hiring lawyers). Some insurance policies are similar in that they have “defend” provisions. It’s part of the service, it doesn’t mean they support what the employee did.