Well yeah, but passing a drugs test doesn't preclude someone from taking drugs as soon as they get the job. I've never heard of that happening here in the UK. Contracts of employment always come with rules around conduct which would cover things like that, so if you're hired and you breach that code of conduct, they can put you on disciplinary and then fire you.
Notwithstanding the "bullshit" comment, it is almost always a baseline liability issue to establish no prior knowledge. As of the date of hire the company can say with proper due diligence that to their knowledge you were drug free. This can be a factor/requirement of the contracts the company has, or the healthcare program offered by the company. You might also be asked to sign a document to that effect. I know my company has a contractual requirement for much of their work funded by the government (for my division, about 65% of backlog) that it be a "drug free workplace", and in lieu of even stricter periodic screenings, we do onboarding testing, and have the employee sign a waiver that they will continue to be drug free.
I'm as pro-legalization as the next guy (actually, more) but a job is a priviledge, not a right, and if the employer, in exchange for paying you and giving you benefits, wants to have (nominally) a drug-free workplace - regardless of the practicality of the program - I think we should thank our lucky stars that it isn't worse. I have seen customers ask for quarterly testing of key employees.