For a long time in the USA, most states required a “blood test” prior to issuing a maarriage license. The “blood test” was a test for syphilis. This is a disease that has certain characteristics in common with AIDS – sexually transmitted, usually fatal in the long run…and when the laws were adopted, not really treatable after infection.
I think you can argue that the state has a legitimate interest in not issuing marriage licenses without at least requiring full disclosure of a potentially fatal, communicable disease. In modern Americal, of course, inability to get a marriage license presents little obstacle to a couple’s just shacking up (which is a change from early 20th century America, when social approbation discouraged most such arrangements). Still, I wouldn’t want to try to argue against pre-marital AIDS testing on “privacy” grounds.