@JoshLymanSwagger
They can’t see who you voted for—only the party you are affiliated with (and can make assumptions based on that).
When you register to vote, you can tick a box to register with a party. It is not like the UK system, where you pay party fees and all of the other stuff.
The reason to register with a party is to have the right to vote in that party’s primary elections. When the pool of names of presidential potentials comes forward, you have the right to vote for the final candidate whose name will be on the ballot for the presidential election.
Each state chooses how they run their primary elections. Some states only allow Republicans to vote in the Republican primary, Democrats in the Democratic primary, and Independents do not get a primary vote. However, in my state, Independents can vote in either/or Republican or Democratic primary, but CANNOT vote in both—Independents have to choose one primary election to participate in.