And a search warrant is not something police just do on their own. The police gather information, take that information to a prosecutor who reviews it for sufficiency and drafts the affidavit. The affidavit is then presented to a judge who decides whether or not to issue a court order directing the police to conduct the search.
That's not always the case. In my jurisdiction, the police draft the warrant and affidavit on their own. A prosecutor only gets involved prior to asking a judge to sign if the warrant is part of an ongoing investigation where there is already a prosecutor assigned (wire taps, homicide).