Another easy explanation is that the causation goes the other way: People with dementia are less likely to gain weight. There could be many reasons they eat less: less cravings, less ability to prepare food, less social interaction at meals, or just forgetting to eat. They are also more likely to smoke, which reduces appetite.
One such hypothesis that reverses the causation is that obesity and dementia could be different responses to the same or similar underlying disturbance.
Obesity and dementia (both vascular and Alzheimer's) are strongly correlated with metabolic syndrome, along with diabetes, heart disease, hypertension, and many cancers. The conventional wisdom is that obesity causes the metabolic syndrome and the other ensuing conditions in the obese, but does not explain how the same problems occur in lean people as well.
With diabetes, for example, there is significant evidence that shows that although the obese are far more likely to develop Type II diabetes than the lean, the lean people that do get it have worse mortality than obese people with the same condition. And here we see a similar correlation showing obesity as being "protective" against a another chronic illness strongly correlated to metabolic syndrome, which is essentially defined as disturbed insulin response.
So one possibility is that the initial condition is the disturbed insulin response, which in most people will result in obesity but some not. Those who do become fat could be staving off the later consequences of metabolic syndrome for a time (first is usually diabetes and hypertension, later heart disease, dementia, etc.), where those who don't fatten start developing those consequences earlier.
So what causes the disturbed insulin response? Robert Lustig would say sugar, Gary Taubes would say sugar and refined starch, Campbell/Esselstyn et al. would say meat/animal products, others will cling to the old tautological standby of 'too many calories', and still others hypothesize a prominent role for things like chemicals in the environment and antibiotics. But regardless of what causes metabolic syndrome/insulin dysfunction, the fact virtually all of what are often described as the 'chronic diseases of civilization' are associated with it suggests that the progression of these diseases, though they manifest differently in different individuals, could be tied to a single cause or group of causes.