Actually it is the music that is made before the music video so your real question should be why does the music video have to relate to the music. The answer to your question though is because if it...
it is a video that 45% of the time shows why the singer or writer of the song wrote it, 10% of the time it's just a jumbled up mess trying to start a trend, and the other 45% is just the singer...
You can attach it or just play it while you shoot the video. Using iMovie, you would select music from your itunes library on the bottom right, dragging it over to your movie.