In regular conversation, I'd agree with you that it's splitting hairs, but we're talking about a bill aiming to become law. Precise language is very important in laws. This bill doesn't say anything about political beliefs or ideology, only affiliation, which is to say they can still teach that certain ideologies are immoral, they can't say being connected to a political party makes you inferior. Which sounds perfectly reasonable to me.Communism is a political ideology (among other things).
If you're going to split hairs about holding an ideology against holding an "affiliation", that'd be weak.