One died in her multimillion-dollar apartment. Another left $1.3 million to charity. A third was an opera costume designer who took regular trips to Europe with his devoted partner. All three donated their bodies to medical science, and eventually served as cadavers for first-year medical students at the New York University School of Medicine. All three had signed forms that promised cremation and the disposal of their ashes by the medical school “in an appropriate and dignified manner.”

So how did their dissected corpses end up instead in mass graves on Hart Island, where New York City buries the dead it considers unclaimed and indigent?

Those cases, discovered during an investigation by The New York Times into Hart Island burials, shocked surviving family members and friends. But they also raised larger questions about body donations at a time when medical schools throughout the country increasingly rely on such gifts, rather than on unclaimed bodies, to teach future doctors.

Now, after searching through anatomical records at The Times’s request, N.Y.U. is apologizing, and acknowledging that the cases were part of a practice that went on for years. Until 2013, the school was sending a subset of privately donated cadavers to a city morgue for burial at public expense.