Sometimes, things don't go right, and sometimes they don't go right in such a laughably ironic way that we pretend these events are governed by an imaginary law that we have no control over. This makes us feel better.
You've probably heard of Murphy's law. For anyone who hasn't, it's usually defined as the principle that anything that can go wrong will.
The most frequently cited example usually involves toast, but it works for bread of most descriptions. The law states that if you drop said toast on the floor, it will always fall butter side down, thus attracting a large covering of dust, colourful fluff, and cat hairs. Even if you don't have a cat.
Where I come from, we call it Sod's law. Who Sod is, I don't know, but he probably predated Murphy and then got quietly sidelined in most parts because people thought sod was a naughty word. SOD. Sod. Sod sod sod. Chunk of earth. Using a word that is often used as a swear word (see The best of British if you are of a non British English persuasion) is somehow appropriate, since the circumstances it prevails in often cause the protagonist to hurl a long stream of obscenities at the world in general.
Sod's law may be a fabrication, but in our imaginations it's real as a misplaced nail. It's also sadly misrepresented by the gentle anything that can go wrong will go wrong explanation.
It's not just that anything that can go wrong will. It's that the things that go wrong are the very things that you were hoping wouldn't. It's a cruel set of circumstances that seem so improbable as to cause exclamations of anguish and disbelief for weeks to come. It's that your toast landed butter side down when it was the last piece of edible food in the house and you were waiting until after you'd eaten it to clean the floor it landed on.
To give another example, it's not just that it rained today. It's that it rained today after three days of glorious sunshine. Three days of glorious sunshine that persuaded me to walk to work today without a coat. That's Sod's law.