Oh yeah. What it comes down to, for me, is that there's really no more logical reason to think that Detect Evil is a perfect test any more than any test in the real world is. I think people just take the author's word for it rather than thinking it through from an in-world perspective.
Even in a setting like Forgotten Realms, most of those theories I listed could still apply.