One likely explanation is that both cannabis and alcohol users abuse substances due to an underlying process that leads to dementia. There might be something that makes you a heavy user AND prone to dementia. But, of course, we can’t say that alcohol or weed are direct causes of the disease.