It has been five years since Marina Krim opened her bathroom door to a scene of unspeakable horror. Her two children, ages 2 and 6, lay in the bathtub, stabbed to death. The nanny she had trusted for two years to watch over them stood nearby with a knife, which she proceeded to plunge into her own neck.

The nanny, Yoselyn Ortega, 55, had slaughtered the two children in her care in the family’s apartment on the Upper West Side of Manhattan while Ms. Krim was out picking up a third child from a swimming lesson.

But the question that has haunted Ms. Krim and her husband, Kevin, as well as innumerable other New York parents who must rely on others for child care, from babysitters to au pairs, is this: Why did Ms. Ortega do it?

Ms. Ortega survived her own self-inflicted wounds and in November 2012 was indicted on two counts of first-degree murder. Her trial was delayed repeatedly as her lawyer laid the groundwork for an insanity defense and sought to suppress the statements she made to the authorities while delirious in a hospital.