Did the the prosecution go to the judge and say, "Your Honor, we don't have squat in the way of evidence. But it you'll allow us to haul Bernie into court then we're pretty sure we'll get what we need from the defense during discovery?"
Probably not, but prosecution has a little handy thing called access to a WARRANT, which is pretty much the same thing as DISCOVERY. Since a citizen plaintiff doesn’t have access to warrants, they have to use DISCOVERY.
Now how much of a case do you think ANY prosecutor would have if they did not have access to the court to search (or... DISCOVER?) for their evidence?