A few things. It's based on nation, not race. The government doesn't care if your spouse is a 5th generation Chinese-American, they care if you have close family that is under the influence of a foreign government. It's not an auto-blacklist or anything, you can be born in China and still have a US security clearance.
Discriminating based on citizenship status is usually illegal, but US security clearance is typically contingent on being a US citizen. The relevant anti-discrimination laws have an exemption for "national security purposes"