They do however ask about drug usage both on the application and when doing their investigation.
It's actually ok to have used drugs in the past, you just have to be honest about it and write a letter saying something about not doing so moving forward (an acquaintance of mine had to do this... not sure what the specifics were).
Once people are have a clearance, most of the tests are decidedly not random. They can be requested for erratic behavior at work (e.g., passing out), but they are especially common for people who are formally busted somehow for illegal drug and/or alcohol abuse. Get a DUI, yeah, you're going to be "randomly" chosen for a test more often than anyone else you know.
If you look at the system holistically with regards to drug testing for folks with clearances, most people would say that the implementation is fairly reasonable. The rules seem incredibly draconian on the surface, but the actual enforcement is decidedly less so.
I have also heard they mostly stopped drug testing people as they where having difficulty finding enough competent, honest, non-drug users in technical fields. Or possibly more importantly they did not want discrete drug use to be a means of blackmailing someone.
PS: I can only recommend someone either answers all questions accurately and only those specific questions asked, or discreetly declines an investigation and looks for another line of work.