When my ship approaches Victoria, BC, we are required to send a complete passenger manifest 72 hours before arrival. This gives the Canadian authorities ample time to investigate everyone.
The evening before we arrive in Victoria, the authorities send us a list of passengers who should not be allowed to leave the ship. This list typically has 10 to 20 names on it. The authorites rarely tell us why these people cannot leave.
After the ship is cleared, the "detainees" are interviewed one at a time by Canadian Authorities.
After the interviews, we are told which ones can be allowed ashore, which ones cannot leave the ship in Canada, and which ones are going off in handcuffs.
Most of the people in question have minor past records; DUI, Reckless driving, Drug possession. The Canadian authorities are normally very close-mouthed about the details, but they have told me that they have full access to the US Criminal database, and time is not a factor they consider when looking for undesirables.