The court’s order for an injunction applies only to the sections relating to defining and reporting data on content violation categories. Social media companies will still be under the remainder of AB 587’s requirements, which include semi-annually creating publicly viewable reports to California on the current terms of service, how automated systems enforce the terms of service, how companies respond to user-reported violations, and what actions the companies take against violators.
Seems like the higher courts ruling is sensible overall.
In addition to what @LwL said - It has to do with how testing is done, and that some diseases can’t really be tested for. It is quite expensive, and is generally done on small samples from lots of people mixed together. If it is positive they split the batch and test again (look up binary search).
The lower the incidence rate of diseases, the larger batches can be done. Ditching certain denographics with significantly higher risks for certain diseases can make testing orders of magnitudes cheaper and faster. (Other groups, at least where I live, include people who recently changed partner, recently went abroad, have ever gotten a blood transfusion, have gone through a recent surgery, have recently been sick, etc. etc.)