A lot of people around me tend to parrot that a lot of the safety measures are not for explosives detection, but for drug trafficking prevention. I've always disagreed because nobody ever presented any evidence to it, and the measures in place do come from explosive detection (unless they have metal drugs now idk).
But I've wondered whether there is some truth to it.
TSA literally says on their own website that they are not looking for drugs and will only report it to the police if it's blatant.
TSA’s screening procedures are focused on security and are designed to detect potential threats to aviation and passengers. Accordingly, TSA security officers do not search for marijuana or other illegal drugs, but if any illegal substance is discovered during security screening, TSA will refer the matter to a law enforcement officer.
I've watched a video about this recently. The problem is, most detectors were based on X-rays in the past decades. Liquid explosives are pretty close to the density (and/or other properties) of water, and you can't tell for sure whether there's toothpaste or boom juice in that tube.
However, some airports started using expensive MRI MRI like X-ray* machines that can see stuff in more detail, plus, it lets you to make cross sections from different angles and therefore have a 3D model that you can rotate on your screen (it's rather cool).
EDIT: I just realised someone else linked this, too. I would leave it here, it's still educational.
I'd just like to clarify: the new machines aren't MRI (the magnets in those would prohibit all metal objects being within 100ft).
The new machines are also xray; but the xray emiters and detector are now on a spinning carriage similar to an MRI. This allows you to build a 3d model of the object and calculate it's volume, which when combined with the density measurements gives much more reliable material detection.
This also means your stuff doesn't have to be removed from bags to ensure items aren't blocking each other from the scanner.