The Iliad and the Odyssey were preserved because people thoughout the centuries cared enough about them to keep making new copies of them when the old ones wore out. No original writings exist of them. In their original form they were oral tales that were related for centuries before finally being written down.
However many other tales and epics are only known from commentaries on them that came centuries later.
Epics that became religious texts also became important and tend to survive the centuries, even if the religion isn't practiced anymore. Epics used to be the way to record all important human knowledge in one story (including science, philosophy, history, et. al.) They usually originated in an oral tradition and kept being added to and edited though generations. Since these tales contained so many things, there was always something to catch someone's interest. Examples include the Saga of Gilgamesh, the Bible, the Koran and others.
Music rarely survives the ages so far. Only about 40 pieces are known that were created between the dawn of man and the fall of the Western Roman Empire in 476 A.C.E.
Some of those pieces survived only because someone put it on their tombstone. Robert Greenberg (a music professor) recommended that everyone put some piece of music on their tombstone to preserve it.
Now that we have ways to record music it might last longer or it might not. The same applies to films and records. The medium we use to record these things are becoming more easily perishable as technology increases. Edison's original wax sound recordings are still playable today, but a CD probably won't be playable for more than 20 years. A floppy disk won't tend to last more than 5-10 years. A vinyl music record can last for many decades though and still be playable.
There's a real danger that a lot of data we collect in this "information age" will be lost in 100 years since it's on a very perishable medium that few care to preserve and most people don't see a real danger here.
The only way such things survive is through a will to preserve it or sheer luck. The Iliad and the Odyssey survive only because people always took enough interest in those tales to keep making copies. Most of the Trojan war account is not in these stories and we only know the tales though commentaries of those lost epics.
Creating multiple copies may not be enough. Small statutes used to be extremely common in the Ancient Roman marketplace. Now they're rare. The reason is that in the middle ages up until the 19th century, common people were destroying them because they were an easy way to get limestone out of them to make plaster to patch their households. It was simply a little easier to do that than go to the moutains and get it from there.
Ancient Roman coins are still plentiful because not only were a huge amount made. A roman soldier who was going into battle could not possibly stop by a local bank to store his money. He buried it before going into battle. If he survived, he retrieved it later. Many didn't survive and the earth preserved many of these coins (though they are not well preservered often).
It seems luck and uncontrollable circumstances have a lot to do with being remembered thoughout the ages.
Therefore the only way something will get remembered is if we make a conscious effort to preserve it. Don't assume someone else will do it. If it's important to you in some way, try to preserve it. If you don't the historians will have even more latitude to make things up and try to pass it as fact.