When I moved to South Africa in the 90s, I found that my American pronunciation of battery would not do when trying to buy batteries in shops. I learned to say, and somehow still say [bætri] instead of my flap-infested, three-syllable American version. Now I live in a place where the word has three syllables but no flap, yet I somehow made myself clear enough to succeed in buying a £7 battery for my watch on Saturday. Three days later, I hear a chink on the ground and it's my watch, which has irreparably broken in the place where the band is held to the watchy bit.
This is an illustration of Sod's law, which is the same law that Americans call Murphy's law ('anything that can go wrong will', etc.). The American name is older, having its origins in the first-half of the 20th century in the US military. (Stories of who the original Murphy was are best treated as apocryphal.) Sod's law came about in the 1970s, and is far more common on these shores than Murphy's law, which is nevertheless usually understood. It probably replaced Murphy's law because of the delicacy of Anglo-Irish relations. (Most Americans would claim that Murphy's law is not an anti-Irish gibe--but if your name is Murphy and you look Irish, you might have a different experience of this.)
Sod is short for sodomite and in this context is probably a play on God's law. It's commonly heard in poor sod--i.e., 'poor bastard' or in many of the places where a stronger vulgarity might be used--e.g. sod-all and sod off. As far as 'naughty' words go, this one is fairly mild these days, and I wouldn't be surprised if a lot of users of the word are unaware of its etymology.