I have no idea what California laws are.
All drugs are legal in OR. That does not mean you get to work at XYZ sawmill. IF, you want to work there, you have to agree to random drug test. IF NOT, go work somewhere else.
What you say is sensible, I just don’t know if the lefties who implemented it agree.