Imagine you have a drug empire and the police are trying to take you down. Now if the cops flip someone in your crew, then they can be considered a "confidential informant." Then everything they gather will be admissable in court.
Now if the police hire another person to infiltrate the police who is not an undercover officer, ( which has to be done with warrants) and then that person brings information, that is called a spy. The difference is that everything they gathered would no longer be admissable in court, and would therefore be considered " entrapment." Any two bit lawyer could have the case thrown out in a matter of minutes.
I really wonder where they were going to go with this had the spy actually found anything out.
RE: Definition of Spy