A plaintiff can’t file a lawsuit simply to obtain discovery - a plaintiff must seek some sort of relief (whether it is monetary or injunctive). In this case, the Plaintiffs sought an injunction, which the judge (rightly) concluded he did not have the power to grant. A court may not hear a lawsuit if it is not within the judge’s power to grant the relief sought by the plaintiff. If the court cannot hear the lawsuit, discovery cannot proceed.
It is not the role of the judicial system to “allow discovery and refer [matters] to Congress for action or inaction.”
The Judge decides what remedy to take if the court finds Obama is not a NBC. He could have decided to turn it over to congress for action since it is their constitutional duty - not the court’s - to remove an illegal president. He could have rejected what Orly was asking for as a remedy from him - removal of Obama from office.