Dementia
When someone I knew died after 13 years of progressively declining mental and physical abilities because of dementia, with about 8 of those years not recognizing anyone, I asked what they could tell me about his situation. This is the information I got:

Message I channeled from Kryon
I would like to proceed with giving you and the family information that you will find helpful about John.
He has left this world knowing he had worked through many things that he could not have worked through had his mind been active in daily living. One of the things you should know about the various forms of dementia is that to most it seems like such a useless time of a person's life, such a waste compared with who they once were. In actuality, the time is spent going inside and the mind, although not able to communicate verbally, can continue to process experiences and still has the opportunity to learn from them. It is like a stew that is being heated. On the surface, nothing is happening, but underneath there is action, and motion is occurring. John has had many years now to process his life and draw conclusions (some quite different from what his rational mind thought). It has been a lengthy process, but necessary for him to understand things at a different level. There is much to learn this way, if the conscious mind has places it doesn't want to go. John has benefitted from the process and is now ready to transition from this life. Before his dementia set in, he was not one to connect on an inner level to his thoughts and feelings. He had no desire to re-live experiences, learn from them, and possibly do it differently the next time. He chose not to question his decisions once they were made. Therefore, there was no "in retrospect" learning. His dementia was one way that his soul could take the rational mind out of the equation and let the body and emotions continue to feel other possibilities. My advice to [the channel], who works with people with dementia, - don't consider it such a shame when there is no communication that makes sense. Even though you can't understand what they say, because they have lost that connection in their brain, they are still processing information and it is totally relevant to what is going on inside. In dementia, the thoughts start in present time, and as these thoughts lose their ability to make sense, the body then uses sensations and feelings to work through past experiences, gradually working back to their youth.
To see this kind of life as without purpose, is to miss the value to the spiritual side of a person, in the time spent this way. A good meal takes time to prepare. A life well spent where there are many lessons learned and advancement made on the path to enlightenment takes either time spent to contemplate, meditate, and assess, and reassess one's actions, and reactions, or it takes time away from the mind that avoids doing this, by either physical or mental breakdown in the body.
The soul that chooses to advance in any given lifetime, uses whatever path it can. Sometimes the lessons are few, sometimes many. Not every lifetime is a major learning experience.
The love of his family meant a lot to John, and he finally understood that more important in life than any career knowledge, or making money, or being a success to the world, is the personal love of his family. Not in his mental state of perfection was this learned, but in his feeling state of mental loss.