It's all interconnected. Getting grabbed by a gang of masked thugs is terrifying because you have no idea what is going to happen to you.
When you're grabbed by uniformed officers who identify themselves, you have some foreknowledge of the process you're entering into. The process is not perfect and it can still harm you greatly, but there's rules and at least some of them are likely to be followed. There's accountability, and that accountability gives you some assurance.
You can't make those assumptions about a gang of masked thugs.