I was under the impression that immigration officers only cared about people trying to smuggle drugs on/in their person or in their luggage. Even watching Border Security Australia, many non-national travelers have had their bags swabbed, come back for traces of drugs and still let into the country.
On the other hand, I've read online and watched many episodes especially regarding American/Canadian officers who turn travelers around that admit they partake in recreational drug use even without them attempting to smuggle drugs or having any drugs charge. They usually come across this while browsing their phone and looking at images of them smoking weed/snorting cocaine.
Is this common?