In addition to it being their profession, a paparazzi, PI, and a police detective are all asked to perform their function by someone else, their boss/client/society, and may partly be allowed to slide from their behavior being stalking simply because doing so was not their private-personal idea.
We often can think like we have to let people slide when they are compelled to do something we don't like if we think they were acting under the direction of a "higher" authority. Then we may "go after" the higher authority.
Regardless, stalking is what makes the person being stalked uncomfortable, and stalking involves 1) stealth of process and harassing or 2) persecuting with unwanted or obsessive attention.
If someone follows another out in the open and the person being followed claims that is stalking, they have a valid point still with respect to "2)".
Thus though the police detectives in the function of their protection of society have understandably a right to do follow people, and such following may border on being stalking, providing their behavior is ethical, I would not argue against the ethicalness of it.
I would, however, argue that both a PI and a paparazzi are stalkers and are not ethically justified in their stalking.
The paparazzi behavior clearly violates both "1)" and "2)".
And the PI behavior clearly violates "1)" and can lead to a result of "2)".