Drug testing in the workplace has become a standard practice, particularly for hiring, simply because various types of substance abuse have become widespread in our culture, and we know that substance abuse may (and usually does) negatively affect a person's ability to function.
From a practical perspective, drug testing is a necessity. No company wants to hire someone whose productivity might be compromised by the use of drugs. More important, from a human resources standpoint, a company doesn't want to hire a person using illicit drugs because--once hired--that person's problems become the company's problems. In other words, if the drug use has to be addressed medically, the company's medical insurance will bear the burden of the cure, and the insurer may pass along the costs by raising the company's medical insurance premiums, and this cost is most often passed down to the employees.
Another issue--but one that is not generally discussed--is the belief in our culture that someone who uses illicit drugs has a character or personality flaw that will negatively effect his or her performance. A corporation doesn't have the time or ability to understand the underlying cause of a person's use of illicit drugs, so the most logical step is to refuse to hire anyone who uses such drugs, and pre-hire testing becomes a fact of corporate life.
Such testing, of course, because it is restricted to hiring decisions, works only to prevent the hiring of someone who uses illicit drugs. If someone begins taking illicit drugs during employment, then the corporation has a drug-use problem that may or may not come to light.
The answer to your question is that drug testing is wise because it has become a necessity, and the failure to test for drugs has serious implications for a company's ability to function.