From Interview with Stanley Kubrick regarding A Clockwork Orange by Philip Strick & Penelope Houston (Sight&Sound, Spring 1972):
Question: To what extent do you rationalise a shot before setting it up?
Kubrick: There are certain aspects of a film which can meaningfully be talked about, but photography and editing do not lend themselves to verbal analysis. It's very much the same as the problem one has talking about painting, or music. The questions of taste involved and the decision-making criteria are essentially nonverbal, and whatever you say about them tends to read like the back of a record album. These are decisions that have to be made every few minutes during the shooting, and they are just down to the director's taste and imagination.
Question: How did you come to choose the Purcell piece -- the 'Music for the Funeral of Queen Mary'?
Kubrick: Well, this answer is going to sound a lot like the last one. You're in an area where words are not particularly relevant. In thinking about the music for the scene, the Purcell piece occurred to me and, after I listened to it several times in conjunction with the film, there was simply no question in regards to using it.
Question: The arrangements by Walter Carlos are extraodinarily effective...
Kubrick: I think Walter Carlos has done something completely unique in the field of electronic realisation of music- -- that's the phrase that they use. I think that I've heard most of the electronic music and musique concrete LPs there are for sale in Britain, Germany, France, and the United States; not because I particularly like this kind of music, but out of my researches for 2001 and A Clockwork Orange. I think Walter Carlos is the only electronic composer and realiser who has managed to create a sound which is not an attempt at copying the instruments of the orchestra and yet which, at the same time, achieves a beauty of its own employing electronic tonalities. I think that his version of the fourth movement of Beethoven's Ninth Symphony rivals hearing a full orchestra playing it, and that is saying an awful lot.
According to Kubrick, verbal anaylsis of why he choose what kind of music is not possible, since it's a non-verbal process. He researched the film, listened to different kinds of music and decided spontaneously ("have to be made every few minutes during the shooting") what music to use.
In essence, he chose the soundtrack, because he felt it fit best when imagining and shooting the respective scenes.
Additional reading: An in-depth analysis of the use of classical music in A Clockwork Orange in Andante, 2016. (this is not based on Kubrick, but the article's author's analysis, in case you are interested. Too long and too much to quote.)