Sounds like they could be using it to meditate.
Cannabis has been used for thousands of years as an aid to meditation in various Eastern cultures, e.g The Saddhu tradition in India.
Meditation has not only made me a better coder, but has really helped with my anxiety and depression.
I found this book most interesting:-
http://headstuffbooks.com/titles/cannabis_and_meditation