Sometimes I'll be listening to a tune and some other completely unrelated tune will start playing in my head over the top of it, even if I have to drastically change the rhythm or tempo to make it fit.
Case in point. I was listening to Led Zeppelin's Kashmir last night:
...and it suddenly occurred to me that the theme from the UK 70's kids TV show The Magic Roundabout would sort of fit on the top of it, harmonically, if you slowed it down and changed the rhythm:
And then I got to thinking about how fascinating the mind is when it comes to music. We must have hundreds of these harmonic blueprints stored away and cross referenced.