My favorite musical composition story is Beethoven's Fur Elise. He started writing the song for his student, whom he was in love with. She wasn't very good, so the song was easy. Then he found out she got engaged, and he made the rest of the song super difficult so she could never play it. You can listen to the song and hear when his heart breaks: https://youtu.be/CQIDLhBJ2y4
It is very unlikely that this story is anything more than a fanciful tale: The dedicatee of the piece is unknown; the work was found in papers long after Beethoven's death and was unknown before that. So, the prospect of there being someone who was told the story and wrote it down, even though it's recorded nowhere is close to nil. See the Wikipedia article for more details.