As given in Al Kooper's memoir Backstage Passes and Backstabbing Bastards
, this song is about the sociological changes going on in America at the time. It seemed appropriate for the film.
In order to make the song work within the film, normally the film would be screening in the studio while the musicians record. Except they decided that was too distracting, so they timed the cues with a stopwatch so they could focus on the music.