It's largely for primary voting in states that have partisan primaries. If you're registered as a Democrat then you receive a ballot with only the Democratic candidates.
Of course one could argue that all primaries should be non-partisan. Or that governments shouldn't spend money on running partisan primaries on behalf of political parties which are private organizations.
I understand having to select a party for primaries & the pros & cons of it. That is a different & even more complicated issue.
I just don't understand why which party I voted for needs to be "public" record. I don't believe that companies & the general public need to know. I've used campaign software that shows how incredibly easy it is to select a list of people & market towards those who voted one way or another in the primary.
Because this may affect which primary you can vote in. For example, only registered Pastafarians may vote in the Pastafarian primary, to avoid spoiler votes from members of other parties.
I understand having to select a party for primaries & the pros & cons of it.
I just don't understand why that needs to be "public" record. I don't believe that companies & the general public need to know that in 2018 I chose to be part of the Pastafarian party. Maybe I want to avoid all the noodle marketing that comes with that affiliation.
In the US we have a secret ballot. Some effort is gone to to not collect information about what you voted for, only that you voted.
Countries with sham elections tend to be open ballot, as the voters need to show they support the current ruler. This is why the selected candidate wins with 98% of the vote or some such.
You can't even get 70% of people to agree on which direction the sun rises.
No, you can have the lists of voters without having any information about who they voted for (or in this case, party affiliation which gives who they probably voted for).