Right... but why does the state want to know which party you're a member of? This doesn't get supervised by the state in other countries. It's usually a personal, private matter between you and the party.
First we have a system of primary elections, and in many jurisdictions your party registration status determines which primary you can vote in. You have to be registered Democrat to vote Democrat, registered Republican to vote Republican, etc. The local election board is the one who oversees to vote, so they need to know your party registration in order to make sure you get the right ballot and the right ballot information (which is sent by mail beforehand). In many jurisdictions you can also "decline to state" and then in a primary election you have to tell them each time which ballot you want.
Second, it's used in state redistricting. Having this information be public allows auditors to check if redistricting is resulting in gerrymandering.
But I feel like I can keep asking ‘why’. Why does the state have its nose in political party business? Why are they running party primaries? Seems like something that should be firewalled off from the state?
In other countries parties run their own candidate selections as private business and the state can’t meddle in it, so the state doesn’t have to ask what what your affiliation is.
Ah, right, sure that's a good point but I wouldn't say it's more "extreme" than other countries, seeing as it's a totally optional thing. I can vote in elections without being affiliated with a party. In Germany, for example you don't have the choice but to have your race/gender/religion/address on file with the central government.
Disclaimer: I'm not complaining about how it is in Germany/other countries in Europe. The trust in government is quite high here, and for a good reason :)