You're getting twisted up thinking I'm making a value judgement about morality or whatever; it's not about goodness or badness.
If a group of business owners coordinates for the benefit of their shared interests, what they have is a business association or chamber of commerce or cartel not a labor union. This is despite the fact that their work individually could be grueling or dangerous, or they have an even worse boss or whatever.
Cops and prison guards, like business owners, are part of the system that coordinates who produces value, when and where. But they do not produce that value, and so their organizations aren't labor unions. It's not merely a semantic point either: they have working conditions sure but their goals and tools are different because of this relationship. From a guard's perspective the ideal prison has no prisoners in it; the second best has them drugged and restrained at all times. How would a union reconcile either of these things?
And you're right, I've only ever been in a prison as a prisoner. What's your experience being employed in one?