Nationally title 7 only protects you from the following: sex, race, color, national origin, and religion. There might be local state laws that protect you from politics, but no national law.
Given the era it was written in "race, color, national origin, and religion" were seen as a way of defining and carpet bombing the entire "ancestry" topic. If they just listed "ancestry" there would be wiggle room with what is the definition in order to discriminate on ancestry. For the purposes of the legal system the definition of ancestry in that context is all of race, color, national origin, religion.
Interesting political affiliation isn't seen as ancestry although in practice it most certainly is. We like to LARP that elections are fair because people decide, when the reality is most of the population is born into party affiliation and boundaries are gerrymandered such that almost none of the public gets to actually decide anything ever. What I'm getting at is we LARP that the people have a voice and a crucial part of the LARPing is we must pretend political affiliation is NOT dominated almost entirely by ancestry. If for example "all black people vote for party X" that would imply black people are not part of a representative democracy where leaders are selected by voting etc, which is totally badthink thoughtcrime to even consider as a physics style thought experiment or mathematical inductive reasoning. So obviously politics can't be a protected class in a "democracy" like the USA.
If you think that's out there, consider something like sharia law [1][2] where the law is based on religion. In some regions, you can get arrested for things you don't even understand.