Pilots cannot smoke a cigarette or drink alcohol while flying, despite those being legal. Yours is an incredibly weak straw-man argument.
I was on flying status for 20 years. I know what the rules are, and it doesn't mean just while flying, it means 8 hours before flying. I think we have all heard stories of drunk pilots who did not observe the 8 hour rule. Flying however, is not the issue. I believe the other poster asked if employers can dump people who fail drug tests. That is what I would like to know too. If you want to call it a straw man argument, knock yourself out. I still want to know.