$ P_1 $and $P_2 $can use such a protocol to find the individuals that are in the intersection of a set known to $P_1 $and a set known to $P_2 $.
They can let $S $know whether there is any intersection and what the correspondence between IDs is.