At least in Florida it's not "public" but you can look it up online without any kind of privileged information other than like name and date of birth IIRC so... Effectively you can just look up party affiliation for anyone and let's be realistic here, unless the person doing it publicly declares that they've fraudulently been looking up other Florida residents voter registration records, there's no way anyone's going to get caught doing this.