It's just like when you get stopped for a traffic violation; some police officers in that situation might treat you very rudely, but it is perfectly legal for them to flag you down.
就像有時候我們違規被交通警察攔下來，有些警察態度很惡劣，但他們攔下我們卻是依法有據。