Why is mentally reproducing music so hard to control? How can it be counteracted?
When we sit, we pass through different phases of consciousness.  At first our mind is active and discursive.  It ruminates over all manner of things, rehearses events to come, and rehashes those that have past.  As we move towards stillness - which can be done simply by sitting quietly in one place - our mind settles into a more passive state.  Rather than taking an active role in the creation of our thoughts, our mind relaxes, revealing its deeper layers.  At this point, things may begin to spring up unbidden.  Sometimes we can experience memories from long ago, other times we may see fragments of pictures in our minds, and sometimes we may experience traces of emotion that have no obvious cause.  If you spend any amount of time listening to music, recollection of song is also exceedingly common.

Don't worry about about the music.  If you persist in your sitting, it will begin to fade.  Song is just a different kind of thought.  Treat it like you would any other - let it have its space, don't try to chase it down or drown it out, sit still, and do your best to maintain attention on your breath.