Ideally the public and the court should reach the same decision. Another reason I see is to protect the witnesses. Has their safety been compromised?
If the public had a perfect understanding of the laws and legal issues involved, and received only information that was allowed under rules of evidence. That's almost never the case.