interviewing at two companies and one tries to stop the other pursuing a candidate.

This isn't happening to me but is rubbing me wrong and I want to know the legality of it.

Someone interviewed at place A. Someone interviewed at place B.

Place A got wind they were interviewing at place B and asked place B not to continue the interview process because they wanted them.

Place B stopped the process.

The person ened up finding this out and reinstated the process with B, but this seems unethical from both places?

I beleive this is cartel behavior and illegal as I have read of stuff like this before, but I wouldn't like to know if this ok behavior in NZ

Cheers