This depends on the testing company's security and privacy measures, including HIPAA compliance. Some use internet encryption and discreet packaging and destroy samples and data after the test is complete and the person has seen their results.
As an STI test can easily link back to a person through their DNA, it is crucial to use a reputable service that protects personal information and healthcare data at all costs.