Quite often I'll be playing guitar on a track, or singing a vocal line and make the most terrible mistake! I go back and re listen to what I've just recorded, and suddenly realise that it's NOT a mistake at all. By some pure fluke, my vocal chords or my fingers did something I hadn't planned to do and you know what? The result is INCREDIBLE!
"Happy Accidents" I call them and my songs are full of them. It's almost like your subconscious decides to disagree with your conscious mind and say "Oy! I'm not playing that shit! I know how to do it far far better, so move over baby and let me SHINE!"
I have no idea how these things happen either. Yet it happens to me all the time. I kind of know that when I am writing and recording, a "Happy Accident" will happen at some point, but I never 100% rely on it. If I did then it wouldn't happen. But the feeling of satisfaction is enormous when you hear something you didn't intend to do, and then realise it works BRILLIANTLY!
Sometimes these things occur in the most random fashion. When writing my most recent song "I Don't Care", I sat down and started coming up with an idea. I embellished it, changed the chords around a bit, "la la'ed" the melody line and then stopped. As I sat there thinking, I decided to fiddle around on the guitar - playing two chords over and over again, almost like a mantra - to go along with my thinking. Then it hit me! These two chords, played totally randomly and bearing absolutely no relevance to the song I was writing, were exactly what I'd been trying to get! I started to embellish the structure around the chords, found a chorus which fit like a glove and BOOOOM!!! I had my song. It wasn't what I set out to write at all. It appeared, from deep in my subconscious mind and almost wrote itself!
So next time you make a mistake at the piano, playing your guitar or even singing - embrace it. It might just be the golden nugget you needed to make the song great!