There are two 'cost' calculations being done. One on the financial side (by insurance companies primarily, as they are the only ones with that interest*). The other on the 'how many people are going to be killed or injured seriously' which is also done on the insurance side, but is the primary responsibility of the medical associations and public health agencies.
The reason why sometimes the 'lost lives' cost of a preventative screening often unexpectedly (to the lay person) recommends against the screening is this:
Therefore, in a population of 1M who undergo the test:
Of the 1000 people who have the disease but will test negative for it, and not seek treatment:
Of the 19000 people who have the disease, test positive, and seek treatment:
Of the 10000 people who do not have the disease, test positive, and seek treatment:
So in total, 50 + 1140 + 500 = 1690...
1690 people will die if the test is used.
What if we didn't test? The math is easier...
1M * 0.02 (2% incidence rate) * 0.05 (5% fatality of disease) = 1000 people die.
So, in this hypothetical example, that totally disregards financial concerns...
If we test for the disease, 1690 people die. If we do not test for the disease, 1000 people die.
Do we test or not?
Obviously, this has greatly oversimplified the actual calculations that take place, and does not reflect the complexity of making these determinations, but I think it may explain why sometimes, even with a very good test, there may be a public health motivation for discouraging testing in certain circumstances.