Some states have "closed" primaries. You can only vote in them if you are a member of the party. That leads to the need to register a party preference. Especially in a vote-by-mail state, get the correct ballot sent to you. States that have "open" primaries (vote in which ever you like) obviate that