If I write a song for my girl, I'm not going to hand her a piece of paper with sheet music and lyrics, I'm going to perform it for her. I may write it down, or I may not.
Of course, composed is a more precise word, but everyone still knows what I mean if I replace it with write.