It’s pretty well known that people can develop psychological dependence on cannabis.
Psychedelics have anti-addiction effects, and it might’ve helped you quit cannabis sooner, even give you insight into why it happened in the first place (potentially numbing of some underlying emotional pain)