Unfortunately tests are not 100% accurate and there's a window between when the pathogen is present and when it's detectible. Add in that many viruses aren't directly detectable, the tests look for antibodies to the virus.
This is why they usually ask if you've had a new sexual partner in the past 3 or 4 months. This is the window period for detecting some STDs and other diseases.