She was starting (barely) to lose her marbles but the real issue was that, at 97, she had outlived all her friends! Also she had moved into an old age home a year before, and didn’t rally like being around, in her words, “old people”. Eventually she decided she was really just hanging around waiting for a centennial letter from the Queen, and that wasn’t worth waiting for.
It’s not like she did’t have family: a couple of her kids, many of her grandkids and great grandkids, but though she had a visitor pretty much every day, everybody younger was busy doing stuff and she felt like she was in their way.
This issue of out living everybody you know is a bit haunting.