It's illegal to take a photo of your ballot to prove who you voted for, think about why. Because if you could then the local crime-ring would force every person they can intimidate to go vote for their boss and take a photo to prove it or the thugs will hurt their kids.
Or maybe think about the pressure some people surrounded by family and friends of the opposite party feel. Sure they will wave the right coloured flag and throw dirt at the TV with their friends at the "wrong" guy, but when safe and sound in the voters box they can do what they like. Imagine if all your friends "opted" into revealing their vote and you didn't.