It is recommended that one have an anonymous test. The results will only be known to you and will not appear on any records.
Some reasons that one would need a confidential test would be: a result is required for immigration purposes or for some international travel visas; a pregnant woman who is clearly at risk might choose to be tested through her doctor, rather than anonymously, since the result is of key importance to the course of her medical care.