Lets take HIV for example. First symptoms of infection are usually a high fever and very sick -- like a really bad flu (after this initial spike, you can go asymptomatic for years).
So you go to the doctor with flu-like symptoms, and they give you an HIV test. Now if you haven't had unprotected sex or blood transfusion with an at risk partner the odds of you having contracted HIV is extremely low. So the general recommendation is not to test you for HIV. But you say, "I want to rule it out. Give me the HIV test." Modern medical testing is rarely 100%. The HIV test is 99% accurate, but 1% of the time you won't have HIV, but it will say you do.
So imagine a population of 1000 zero risk people who take the test. On average 10 are going to come back as HIV positive. And maybe start an HIV regimine, rather than just realizing that its just the flu, which would have gone away in another day.
The point is you try to focus on what is common first. You rule those things out first, before diving into the more obscure. This not only reduces healthcare costs, but also reduces the burden on the healthcare system, and likely improves the health of virtually everybody.