It's a soft requirement, because the witness will be 'necessary'[1] in court
in the particular circumstances of this particular crime. If the prosecutor had a stronger case (Say, a different witness, or CCTV evidence, etc, etc, etc), then this particular witness would not be necessary.
[1] In the opinion of the average criminal lawyer, assuming that the case is litigated correctly, and that the jury isn't entirely composed of utter mouth-drooling morons prejudiced against the defendant.