In the US, some immigration issues are straightforward (this person overstayed their visa, that person crossed the border illegally), and some are complex (the reason this person crossed the border may have been to assist a human trafficking ring; or the reason that person entered the US on a tourist visa was actually to obtain weapons that it is illegal to export from the US; and we need to investigate that possibility).
In other words some immigration issues require investigation by something like specialized police (e.g. ones specialized in human trafficking). When something is discovered that suggests such an investigation is needed, an "investigative referral" is made to the appropriate investigators -- ones who investigate that type of crime and are located in the proper jurisdiction.
Here's an article about a man from Fiji who allegedly entered the US in order to get technology to smuggle back to China. The US Dep't of Defense Security Service made an investigative referral to the Seattle branch (because he entered the US there) of HSI (Homeland Security Investigations):
https://www.ice.gov/news/releases/fiji-man-indicted-conspiri...