“I’ve definitely not revealed the secret of Coke,” said Mr. Lee, who represented Apple in a patent suit against Samsung — another trial that exposed closely guarded secrets. But, he acknowledged, “you’re learning a lot about the admissions process that never would have been public otherwise. We want you to know. Once you understand it, you can understand how decisions are made.”

Some, but not all, of the secrets have buttressed Harvard’s elite reputation.

It casts a wide net for students, aggressively recruiting those in “sparse country,” predominantly rural areas that yield few applications. It considers a dizzying array of factors, from SAT scores (the higher the better) to athletic ability (recruited athletes receive a big advantage) to interviews (be “effervescent,” “fun,” but “mature”) and more. A lack of deep pockets won’t hinder a hopeful and might even help one’s chances, testimony showed.

But there were other disclosures suggesting that admissions decisions are somewhat arbitrary.

There is the special list for those whom the admissions dean has taken an interest in, some of whom are the relatives of wealthy donors. There is the vague “personal” rating, which can lift or hurt an applicant’s chances based on an assessment of character traits and background, from “outstanding” to “bland or somewhat negative or immature” to “questionable personal qualities.” And the trial this week has raised questions about whether unconscious bias affects the process, either on the part of admissions officials or the teachers and counselors who write letters on applicants’ behalf.

More important than numerical ratings — Harvard uses a scale of 1 (top of the heap) to 6 (no chance) to measure the many aspects of a student’s profile — is “the description and the complexity of the description” provided by those assessing the applicant, Mr. Fitzsimmons said this week in testimony.

A rare look inside a student’s admissions file this week has shined a light on what that means. Harvard referred the court to Thang Q. Diep (Harvard Class of 2019), who had only middling test scores but was admitted to the college by showing a strong work ethic and “infectiously happy personality,” as his admissions file says. Mr. Diep, who was born in Vietnam, submitted part of his file in court to help Harvard fight charges of discrimination.

“Here’s a person who until the fourth grade was in another country and English was not his first language,” Mr. Fitzsimmons said.

Mr. Fitzsimmons quoted an admissions interviewer as saying that what was most striking about Mr. Diep was “his fun, casual nature, but impressive, understated maturity.”