To begin, similar to trials, pre-trial hearings are open to the public. The only time a court may close the courtroom is for security reasons. The prosecutor, however, has a burden to demonstrate "legitimate, immediate" danger and show it does not violate the rights of the accused. If defense counsel can demonstrate friend(s) and/or family members do not pose a security threat, at times judges will permit them to remain, even if the courtroom is ordered closed for a specific witness.
Pre-trial hearings are invaluable to preserving our constitutional rights. The Prosecution must demonstrate to a judge, the evidence gathered in a criminal case by authorities, including police, FBI, or a government agency, must have been taken without violating the constitutional and/or statutory (state law) rights of the person accused. This includes the state's constitution, where the crime occurred, as well as the United States Constitution and covers any identification made by a witness, while the accused was in police custody, physical evidence seized from the person accused, and/or statements s/he gave to the authorities. If the Court finds any individual right(s) of the accused were violated the Judge must "suppress" such evidence. This means, the Prosecutor cannot introduce the evidence against the accused at trial.
Often people will comment, an individual "got off" on a "technicality". However, it was actually a critical constitutional and/or statutory right protecting our right to privacy, right to counsel, right to remain silent, etc. For instance, if an accused is questioned for an extensive period of time, not provided food and/or water, and is subjected to physical abuse, the Court may find, initially, his or her Miranda rights were not voluntarily waived, or if the Judge does find they were waived voluntarily, but because of subsequent abuse, the Court may determine the statement taken was "unreliable".
With respect to an identification, if an accused is surrounded by police in uniform and paraded in handcuffs before a witness, a court may determine such an identification is "unduly" suggestive and neither police nor the witness are permitted to testify at trial about the identification that occurred during that specific identification procedure. Similarly, if a person is placed under arrest at their home and police suspect there is further evidence of the crime at that location, they must obtain both arrest and search warrants, naming or describing the individual to be arrested, the location and the specific items they have cause to believe can be gathered to prosecute the case.
Finally, a defendant can be set free at the conclusion of a pre-trial hearing, if the Judge finds his or her rights were violated and the evidence cannot be utilized against the accused, defense counsel can make a bail application and request release or with a lessesr bail, depending on the worth of the evidence suppressed by the court.
Best of luck!
Sincerely,
-- Laura Miranda