“The justification”
They don’t legally need a justification. The reality is that drug tests just like felony checks are very good filters for bad employees. If a company actually needs employees they won’t do them, or lower the standards so low that anyone that isn’t actively injecting or murdering someone would pass.