On Monday, a decade-old deposition became the talk of the nation.

As we reported, in it comedian Bill Cosby admits that he gave sedatives to at least one woman whom he wanted to have sex with.

The deposition was given by Cosby during the discovery phase of a civil lawsuit against the comedian. At the time, the judge presiding over the case sealed the records of the case while lawyers from both sides gathered evidence. While that was going on the two parties came to a settlement, signed a confidentiality agreement and the temporary seal — and the case for that matter — was forgotten.

So, how and why did this deposition become public now?

The simple answer is that after accusations of sexual assault re-emerged against Cosby, the Associated Press asked the court to unseal the documents and the court agreed.

Legally it's more interesting. U.S. District Judge Eduardo Robreno issued a 25-page memo outlining his reasoning. Here's how he explains it:

-- The court's rules state that unless there is an objection, documents filed in the court will be unsealed automatically two years after the conclusion of litigation.

-- When the AP filed a request to have the documents unsealed, Cosby's attorneys objected, saying it would violate Cosby's right to privacy by making public, among other things, "intimate knowledge about his sex life." Cosby's lawyer also argued that the release would embarrass Cosby and would violate the confidentiality agreement signed by the two parties.

-- Robreno dismissed all those arguments.

-- Perhaps the most intriguing part is that Robreno concluded that Cosby should be thought of more as a public servant. Previous courts have held that public servants, or politicians, give up some of the privacy protections afforded to regular citizens or even public figures.

-- So, how did Robreno make that leap? He argued that while Cosby is clearly a public figure, when he talks about issues of public policy like unwed mothers and crime, he becomes a "public moralist," which, like it might for a public servant, opens him up to "legitimate public scrutiny." Robreno writes:

-- In the footnotes, Robreno specifically points out Cosby's speech at the 50th anniversary commemoration of the Brown v. Board of Education. In it, Cosby lays into the black community. Cosby said: "Ladies and gentlemen, in our cities and public schools we have 50 percent drop out. In our own neighborhood, we have men in prison. No longer is a person embarrassed because they're pregnant without a husband. No longer is a boy considered an embarrassment if he tries to run away from being the father of the unmarried child."

-- The release of these documents, Robreno argues, is therefore important for the public to weigh "the stark contrast between Bill Cosby, the public moralist and Bill Cosby, the subject of serious allegations concerning improper (and perhaps criminal) conduct ..."

-- On the embarrassment claim, the judge counters:

Copyright 2016 NPR. To see more, visit http://www.npr.org/.