This is the territory where police departments and agencies get themselves into trouble - investigating crimes that aren't really their job to investigate. They technically have jurisdiction over a specific location or process, and that gives them an excuse.
The most obvious parallel is pretext stops - state cops, sometimes local, coming up with an excuse to pull someone over on a highway, in order to check them for warrants or in hopes of discovering contraband they have no reason to suspect exists.
A less obvious example is immigration enforcement fishing for excuses to deport someone.