Cop shows frequently bend the rules of legal logic for the sake of drama.
See also: the number of times on Law & Order a perp gets damaging evidence dropped and/or gets off scot free due to a legal nitpick that would've been denied on sight in real life.