Stanley Kubrick commissioned the prominent film composer Alex North -- famous for the scoring of Spartacus -- to write the music for 2001. However, film music is only recorded and added at the final stage of editing; normally all of the video is laid down first so that the music director knows exactly how long each scene will be and the music can be recorded at the right tempo to match up.
During the video editing process, "temp music" is used -- typically classical music because it's widely available -- so that scenes have the right feeling when they're viewed by the director. For this purpose, Kubrick selected the opening fanfare from Also Sprach Zarathustra for the start of 2001, The Blue Danube for "floating through space" scenes, et cetera. However, after viewing the edited scenes with the "temporary" background music, Kubrick decided that he really liked it that way -- and so rather than using the score which North was composing and recording, he re-edited the video to match the tempo of the classical recordings he had used.
Legend has it that Kubrick didn't know how to break the news to North -- but however it happened, North turned up for the premiere expecting to hear the music he had spent six months composing and recording, and was devastated to hear the supposedly "temporary" music used instead.