Correlation does not equal causation. Perhaps people prone to depression and making poor choices are more likely to self-medicate with pot, alcohol, tobacco and so forth.
If youngsters were seeking to "self-medicate" with marijuana then they would be doing better.