Jazz and animation enjoyed an organic relationship in the developmental period for both forms.
From the 1920s to the early 1930s jazz provided frequent animation soundtracks. For the most popular and enduring cartoon characters, it was their music of choice. Two forms with clear structural similarities of syncopation and rhythm temporarily merged.
Together they created a timescape or representational space that critically challenged taken-for-granted relationships with the modern(ist) world. In an anti-realist attack on modernism, animated characters asked critical questions of their audience in a similar way to Brecht’s epic theater. In an alliance with jazz, they unmasked hidden aspects of society and its technological marvels in a questioning, revealing, and confrontational manner.
The comparatively marginalized position of two improvised forms allowed for the development of a critical artistic movement identified by the Frankfurt School—in particular, Walter Benjamin and Theodor Adorno recognized that popular art was not merely a reflection of economic life but constituted a conscious, active force for change. The subterranean and often subversive values of the animation–jazz alliance were quickly recuperated, but for a limited period they offered a resistance that ran counter to established taste and the bourgeois appropriation of high art.
This according to “Of mice and music: Image, soundtrack, and historical possibility” by Coinneach Shanks (The soundtrack VI/1–2  pp. 67–81).