My friend did a drug test for a part time job for the local school district. When she got her results, she found out that the district also did a pregnancy test. Besides ethical issues, this seems like a legal red flag given she wasn't told this would be done.
The OP added that her friend's spouse (male) did the same screening for the same employer, but no pregnancy test.
If it looks illegal, and it smells illegal, then it's illegal. Let's examine why.
Believe it or not, this testing might not per se violate the Pregnancy Discrimination Act. The EEOC says, "Federal law does not prohibit employers from asking you whether you are or intend to become pregnant." If it's not a Title VII violation to ask a job applicant about whether she's pregnant, it's also likely not a violation to test her for pregnancy. The issue isn't whether you obtain the information, but how you use it. The EEOC adds, "Because such questions may indicate a possible intent to discriminate based on pregnancy, we recommend that employers avoid these types of questions." If you don't have a legal use for the information, why obtain it in the first place?
2/ Sex Discrimination.
Why pregnancy test women and not men (aside from the obvious reason that men can't get pregnant)? Treating men and women differently for their pre-employment screening absent a bona fide job-relatedness reason to do so (aka a bona fide occupational qualification or BFOQ) is sex discrimination.
3/ Disability Discrimination.
Pregnancy is not a disability under the ADA, but the ADA still regulates pre-employment medical inquiries, including drug and medical testing. Pre-employment disability-related inquiries and medical examinations/testing are permitted, but only if: (1) it is done after an applicant is given a conditional job offer but before starting work; (2) and the same inquiries, exams, and tests are given to it all entering employees in the same job category. If an employee is pregnancy tested but her spouse isn't, it sure looks like a violation of the ADA's medical examination provisions. Moreover, as noted above, there is no legally justifiable business reason to discover an employee's pre-employment pregnancy status. If you can't legally use the information, why test for it in the first place?
4/ Privacy Laws.
There may be statutes in specific states that require notice and consent for pre-employment testing. If so, surreptitiously giving a pregnancy test would seem to be in violation. More generally, however, the common law protects one from what called "intrusion upon seclusion." It's defined as a reasonably offensive intrusion into the private affairs of another without authorization. This situation certainly seems to fit that definition. One's pregnancy status is one's own business, period.
A testing lab conducting a pregnancy test without informed consent and then providing the result to a third part sure seems like a HIPAA violation. However, there is no private cause of action under HIPAA. Instead, it would be further evidence in support of privacy tort outlined in number 4 above.
The bottom line: Employers, don't pregnancy test job applicants or employees. It's almost certainly illegal, and it's definitely none of your business.