Depending on company policy? If a company believes (rightly or wrongly) that allowing drugs in their workplace will be beneficial why not let them?
The only place where it should remain outlawed is situations where it could lead to accidents like driving heavy machinery, etc.
I think Spacex is partly a military contractor and drugs are forbidden for that. After Musk was seen with a joint on Rogan the whole company had to do regular drug tests for quite a while.
because the military are stupid doesn't mean everyone need to be...