In very much the same way currently used antidepressants can trigger schizophrenia and other related, latent disorders in users?
Previously it was suspected to be a mere correlation -- that there's something about underlying mental disorders that draws one to cannabis, rather than cannabis causing mental disorders. In recent years, they have established a causal relationship cannabis -> psychosis (assuming the predisposition is there, of course).