If youre willing to accommodate a highly opinionated take from experience:
Intelligence itself seems to correlate with anxiety, i.e. being able to construct and focus on abstractions, as opposed to your immediate environment, on demand increases likelihood of fixation on abstractions.
Combine that with a lack of forced grounding in computer-based professions, i.e. little human interaction, and you're a heck of a lot more likely to be in your own head, then add weed on top and you're even more likely.