This is outright corruption.

If somebody can see the party affiliation from the outside of the envelope wrongdoers can steal them, trash them, vote them etc.