Sudden Musical Ending

"If there's one thing to learn, it's you just can't go wrong,

If you follow your heart, and end with a song.

[elaborate song and dance number]"

- The Narrator, Ella Enchanted

A film, despite not previously having been a musical, ends with a Crowd Song (possibly a traditional musical number, more likely lip-synced to an existing recording) involving a significant portion of the cast without regard for the previous relationships (or even physical locations) of the characters involved. American examples are possibly derived from the straightforward (over)use of this trope in Euro cinema.

Frequently overlaps with Dance Party Ending. Probably related to Big Lipped Alligator Moment and to Gainax Ending. Contrast with Dancing Is Serious Business.

Film -- Animation

 * Shrek ends with all the characters singing "I'm a Believer".
 * And the first sequel ended with "Livin' La Vida Loca".
 * The recent animated movie of Horton Hears a Who has all the characters break into Can't Fight This Feeling at the end. According to the DVD Commentary, this was because they wanted to avoid a Bittersweet Ending where Horton has to leave Whoville behind and never talk to the mayor again, and that's all they could think of.
 * At the end of Open Season 2, everyone begins to sing "Close To You" after the wild animals and pets settle their differences and become friends.

Film -- Live Action

 * My Life as a Dog (Mitt liv som hund), a perfectly serious (and Oscar-nominated) 1985 Swedish film about a young boy whose mother is dying of cancer, ends with an incongruously lighthearted song-and-dance number as the end credits roll.
 * The Nasty Girl (Das schreckliche Mädchen), a perfectly serious (and Oscar-nominated) 1990 German film about a young woman who discovers that many of the "anti-Nazi resisters" in her town had actually been eager Nazi collaborators, ends with an incongruously lighthearted song-and-dance number as the end credits roll.
 * Mr. Bean's Holiday ends with everyone on the beach, lip-syncing to a French version of "Beyond the Sea."
 * Inland Empire
 * "Age of Aquarius" at the end of The 40-Year-Old Virgin.
 * Theres Something About Mary had the entire cast singing along to "Build Me Up Buttercup", switching around to different locations used in the movie.
 * Slumdog Millionaire.
 * It definitely falls in this trope, but this is also a nod to the film's Bollywood influence; Bollywood flicks are generally loaded with song and dance numbers.
 * The movie version of Ella Enchanted ends with all the characters singing "Don't Go Breaking My Heart". Including the villain, . Eric Idle as narrator provides the page quote.
 * Bring It On ends with the cheerleaders lipsynching to "Hey Mickey." clip
 * Casper, the film, in which at the end the entire cast breaks out into a Little Richard cover of "Casper the Friendly Ghost."
 * The final scene of Who Framed Roger Rabbit shows the main cast of the movie and half the population of Toontown parading out of the factory as "Smile, Darn Ya, Smile" plays in the background from out of nowhere. A less out-of-left-field example than most, since the song had been heard earlier and it had already been established that Toontown was a naturally song-filled place.
 * Get Over It has the cast singing Earth Wind and Fire's "September."
 * Evan Almighty has the cast singing and dancing to "Gonna Make You Sweat (Everybody Dance Now)" during the credits.

Live Action TV

 * Skins series one ends on a performance of "Wild World" sung by Sid, Tony, Chris, Angie, a few guys in the toilet, and a bus driver.
 * The American remake ends with Stanley leading a performance of "Shout" on stage at a club.
 * The hundredth episode of How I Met Your Mother ends with an unexpected musical number about Barney and his suits.
 * An episode of Thirty Rock featuring numerous references to Gladys Knight sees Kenneth deciding to go home to Georgia. By rail. Around 12ish. Most of the cast burst into song at the end of the episode... until Gladys Knight finally shows up, just to tell them to cut it out.

Video Games

 * Limbo of the Lost does this extremely narmfully.
 * Plants vs. Zombies ends with the zombies deciding they don't want to eat your brain after all, they just want to make a music video. (The song may eat your brain anyway.)

Web Original

 * "Invention Pioneers of Note" has this for the last season.