hahahaha this happens all the time.
Hell, I do this so much.
alot of my remixes on ocr resemble certain pieces of music already written, but I find that making pieces of music that resemble already existing pieces of music is a great way to learn.
And the whole elecman theme resembling journey and apparently REM (I wouldn't know about that one) that melodic phrase in the melody is used so much in mainstream music its crazy I've heard that in so many pieces of music
I find it interesting because you hear things subconsciously, like maybe a piece of music on the radio in the background, you hear that piece of music in your head later, or something resembling it, then you think you've made it up as a result because you can't remember where you heard it or if you heard it at all.
I remember hearing a piano piece played by a pupil in a piano lesson before me, and I used that melody in a school project later that week without realising I hadn't written it. Then when I went for my lesson the next week, I heard this same piano piece again and realized that i'd used part of that piece of music in my project, without even realising i'd done it