Because in order to federate, user data needs to be shared, including the username. It prevents double votes from the same account and also allows votes to be rescinded at the user's discretion, at which point the instance will send effectively an undo signal for the activity.
The first rule of the Fediverse is to make sure you're perfectly okay with the entire internet seeing your account activity, including votes and favourites. If you're unsure or are worried you might regret it, best not to post it at all. This is equally true on all social media but the way the Fediverse works just makes it more obvious.