The ban on politically oriented clothing is a matter of law.

In New York no electioneering is allowed within 100 feet of a polling place, and that includes political slogans/candidate messages on clothing. I believe in Massachusetts it's either 100 or 200 feet from a polling place.