The noticing of what was there and unnoticed. Detection finds; it does not judge.
Latin detegere, to uncover, from de- (away) plus tegere (to cover); the removing of a covering so a hidden thing becomes visible.
The noticing that a condition holds, surfaced so it can be acted on rather than assumed. Detection reports a state; it leaves the judgment of what to do about it to whatever reads the report.