If it is biased to those who are suffering already or would suffer from it.
Theoretically if depression earlier in life protected against dementia (not likely at all but bear with me) it would actually raise the rates.
I wonder what the actual correlation is however even keeping in mind spuriousness.