Catchy and annoying tunes

As an amateur musician I am constantly thinking about music and there is often some seemingly random piece of music running around in my head. But it occured to me that very rarely is the music circulating around my mind the very best of music and it is often quite mediocre. This appears to a very common phenomenon, judging by what people say about having a tune stuck in their head and how annoying it is. Often is it some second-rate pop song with an annoyingly catchy and rather naff chorus that does it.

But why would second-rate music be the kind that preoccupies the mind and not the very best music?

My theory is that it is related to the human love of a mystery, and the notion of a puzzle that can never be solved. People obsess over mysteries of all kinds. Humanity loves a mystery and people get great pleasure on working to see things resolved, discovered and understood. Similarly, if something is incomplete people will think about it repeatedly and frustate over the non-resolution.

I believe that catchy tunes work similarly, like a unsolvable problem. A good tune occurs when there is a complete resolution of a perfectly set-up musical tension. A second-rate melody preoccupies the mind because it is not complete, it does not set up a tension fully and is never quite resolved satisfactorily. Tunes like these stick in your head, I suggest, because your mind is repeatedly trying to resolve the melody properly and to complete the tune fully without quite knowing how. It is like trying to solve an unsolvable puzzle. Your mind is searching for a way to make the tune complete but because it never will be it goes around and around in your mind endlessly. We love a mystery, but sometimes it can be a curse as well as a blessing.