Throughout our U.S. legal history, as inherited from English law, the courts have always had the option of conducting all or part of their business in private. An early English court, called the Star Chamber, was established to try the rich and powerful. All of its deliberations were held in secret with no witnesses, no juries, and no appeal from its decisions. In our time, the courts still have the right to close all or certain portions of a trial to the public or to "seal" portions of the record so that they cannot be examined without a court order.
I usually run into this situation in cases where there is a dispute about some sort of attorney/client privileged information that is disputed by opposing council. The disputed information is filed with the court under seal to prevent the confidential or privileged information from becoming a public record. I also see some accounting records, particularly personal financial records, submitted to the court under seal. In family law cases, sometimes the testimony or proceedings concerning minors is conducted in private and record placed under seal.
When the documents are in the Court file under seal, they cannot be unsealed except by order of the court. Usually, the court rules allow any interested party to move, apply or petition the court to have the documents unsealed. In the case of old documents, now of genealogical interest, the moving party would have to demonstrate to the court the need for the information in the records. If the records are very old, it would seem that there would likely be no purpose in continuing the status of the records as sealed. Any privileged, private or confidential nature of the documents would have long ago attenuated.
As an example, see the 2010 California Rules of Court regarding Procedures for filing records under seal. There is no reason to reproduce the entire rule here, but an examination of the rule illustrates the usual type of procedures involved in both placing a document under seal and having the seal removed.