Video: It's not as simple as just playing sad music over sad scenes. No, Pixar plays with our emotions through music, sending out contrasting messages through what we see and what we hear to tear at our feelings even more. Which means, mixing happy music over sad scenes is how Pixar really gets us.
But to add another level, the music composition in Pixar movies establish themes early on in the story and then hits us with that same tune much later in the movie, when we least expect it (and are more vulnerable to it). It's a multi-layered call back to all the emotion we built up throughout the entire movie. It's what makes the emotional scenes in Pixar movies so brilliant.
Watch Sideways analyse the use of music in Pixar moves like Monsters, Inc. and Up and how they compare to something like Big Hero 6 in the video below.