98% of the world's population are reckoned to have this phenomena, known as an earworm or brainworm. But I doubt whether statistic also applies to OCD suffers. (if that's the right term) I get them very often and they do not bother me in the slightest. And although I do show a slight inclination toward OCD, that doesn't bother me either.
A tune that came to me recently kept me guessing for quite a few days. I knew that it was a film score but I couldn't think which one. Then after about a week the penny dropped. It was the title music from 'Gone With the Wind'. A film made 6 years before I was born. What a memory!
For those who are bothered by earworms, a few minutes mindfulness meditation can be helpful for you.