There were actually some good reasons for those laws, but IMO they now do more harm than good. Which raises a question: If there's a ballot measure to strike them down, how can I resist the urge to take a picture of my "yes" vote?
This comic was published six days prior to the 2018 United States general elections, also called midterm elections, because they happen halfway between two presidential elections, two years before and after. At the time, the xkcd header still provided a link to vote.org, a website that helps US citizens with essential voting issues, like how to register or how to find their polling locations. It is the first of three consecutive comics that deal with this election.
In the United States, "ballot selfies" refers to the practice of taking a picture of oneself with a completed ballot. These have been illegal in many states, due to laws passed to prevent vote selling.
Without proof of how a vote was cast, if someone bribed (or even violently coerced) a voter to vote for candidate A, the voter could just vote 'B' and the coercer would be unable to tell whether they voted as instructed. This is at the heart of the concept of "a secret ballot". But if ballot-selfies or other proof-of-vote mechanisms are permitted then the evil-doer can demand verification that the voter did what they were coerced to do — and this jeopardizes the idea of a truly free and fair election.
However, the "secret ballot" principle is not universally valued nor enforced. Some voting machines produce a paper receipt showing the choices the voter made — and many jurisdictions permit use of a postal ballot — so there are plenty of other ways to circumvent the law in those places. So the ban on ballot selfies is harder to justify unless those other lines of coercion are also ruled out.
On the other hand, the desire to take and distribute ballot selfies often comes from an excitement in participating in the voting process and the desire to share that excitement in the hopes of encouraging others to vote, and anything that helps get more people to the polls is generally considered to be a good thing. In addition, the law is incredibly difficult to enforce — there is little way to prevent somebody from photographing their ballot and privately showing this photo to somebody else — and the practice of enforcing it (i.e. searching for possible photographic devices all together) would make the local government incredibly unpopular. Lastly, voters storing evidence of their votes could be useful to prevent voting fraud performed by the state.
This dual threat/benefit has led some states to explicitly legalize ballot selfies, other states to specifically disallow them and even levy steep financial penalties, while the rest are still debating or ignoring the issue.
As Ponytail is aware of this law, she believes she has identified a solution wherein she will make an oil painting of her voting rather than taking a photograph. A painting being more of an artistic endeavor that doesn't have to faithfully record all aspects of the image, it may well be valid both on grounds of freedom of speech as well as not being a verbatim record of her vote - thereby preserving the secrecy of the ballot. Of course, making a painting of her vote may lead to additional problems. If she intends to paint the portrait herself, of herself (i.e. a self-portrait) casting her vote, it would be very difficult and time consuming to attempt to do that, especially without a mirror, which she apparently doesn't have with her and which is generally not standard issue in voting booths.[citation needed] She could also try to recruit someone else to do the painting, not knowing the level of their artistic talent, however, usually only the person casting the vote is allowed in the booth, and they are expected to close the curtain or otherwise ensure no outside person, like the painter, can view the vote casting act. It would also require her to stay in the booth longer than most voters.
While Hairbun and White Hat are simply standing in line, Megan can be seen using a mobile phone.
The comic might also be a reference to the existing ban of cameras in US courtrooms, which led US newspapers to widely adopt cartoons as a replacement.
In many US states, changes to state law can be made through the initiative and referendum process, which can be initiated and pursued by any citizen.
The title text refers to the legality of taking a ballot selfie whilst voting against the law against ballot selfies.