There's another mechanism at play. It wasn't always there.
Take Max and Dave Fleischer cartoons of the 1920s and 1930s. They'd star black singers like Cab Calloway, make references to LGBT subculture, premiere immigrants, Jewish characters, and the full spectrum of society. They were engaged with integrating live action and animation and experimenting with the film as art form.
Compare that to say Walt Disney, the most whitewashed family friendly content.
And it wasn't just "Hayes code", there's something deeper in how people want to relate to their entertainment. Adventurous narratives that challenge people's assumptions doesn't seem to be what people are looking for when they are relaxing from a hard day