But even with that in mind, I remember the one time my dog was playing with another dog, and suddenly the play turned to aggression on a dime, and I had to pull those dogs apart, and one ended up with a piece of it's ear gone. Neither dog had a history of aggression, neither has done anything like that ever again. There was no warning, it just happened.
Why? I have no clue, and I never will, because dogs aren't people. I can't even know what another human is thinking when a violent outburst happens, much less another species.
So are drug-sniffing dogs reliable? I bet they are, but just like people sometimes they can be wrong, or they can have a bad day, or they can give the answer they thought the trainer wanted. Who knows? We don't know how they experience the world enough to even make a guess.