2. While political party membership is not a protected class under U.S. anti-discrimination law[1], it may be strongly correlated with protected characteristics like religion or age. So, hypothetically, if by discriminating against Republicans you're also systematically discriminating against Christians or people over 40 (due to some correlation between these groups), this may be a basis for legal action against you.
Even if you never get sued, if word gets out that you're delving into employees personal lives in such intrusive ways, your reputation might (justifiably) suffer.
Fortunately, political affiliations is protected in California, New York state, and Seattle (sadly not Washington state). These three places cover a good chunk of the tech workers in the US.
But I think there is a desire to have employees that are not liabilities. For example, if they were harassing people online that could come back and damage their reputation: Imagine a headline: "Crazy person who works at Company X does something crazy"
It's unavoidable that we'll be 'Googled' when applying for jobs. But also what's unavoidable is people creating tools for typing in a name and getting all information about them, it's big money.