If a character enters an elevator for any reason, the music playing on its speaker system — regardless of the program's genre — is almost alwayssome version of "The Girl from Ipanema" by the great Antonio Carlos Jobim. (If not, it's probably the "Theme from A Summer Place", which would probably be referencing a comfortable break from the action.) Of course, few if any elevators nowadays actually have music piped in anymore, making this something of a Dead Horse Trope.
Some choose to trace this back to directors such as John Landis, who used it as an in-joke in every scene he shot in an elevator. This is usually an integral part of an Uncomfortable Elevator Moment.
An Australian comedy duo called The Umbilical Brothers have a skit that entails a ride in an elevator. As there's no elevator prop, entering the elevator is signaled with a vocal beatbox of "The Girl from Ipanema".
The Angel: After the Fall comics, the Senior Partners send the entire city to Hell midway through the TV show's Bolivian Army Ending. It should come as no surprise what music plays when Spike gets in an elevator...
Subverted and lampshaded in Pretty Cure Perfume Preppy. In the sixth episode, there is an elevator moment, in which a bossa nova-ish version of the opening for the first season of Yes! Pretty Cure 5, "Smile Go Go", played instead of the obligatory "Girl from Ipanema". Chiara asks why is it so, and Hakuo responds it was too overused.
The Life, a Halo fanfiction, has several scenes when the characters have to take an elevator. So far, every single elevator scene has had a muzak arrangement playing in the background. There's usually lots of Lampshade Hanging from the characters involved. In fact, the A.I. running the main character's ship plays elevator music on all ship elevators with the intention of invoking this.
Films — Animation
Non-elevator example: in Finding Nemo, "Ipanema" plays in the dentist's office when Nemo is first seen in the fishtank.
In Toy Story 2, when Al is riding the elevator down to the lobby, the music playing is an "Ipanema"-style version of the main theme from A Bug's Life. Both films were scored by Randy Newman.
Non-elevator example: In Shrek, Antonio Carlos Jobim's lesser classic "Meditacion" is heard at the main guest entrance to the castle of Duloc.
Films — Live-Action
Used in Mr. and Mrs. Smith (2005), when the title characters shoot their way into an elevator not once, but twice in quick succession. Both times, the song is clearly playing on the speakers. (The second time is arguably funnier, due to the presence of bullet holes in the elevator walls...)
Used in Babe: Pig in the City, with an elevator full of animals.
On Scrubs, Dr. Cox and the Janitor take over the suite of a man who had been transferred out of the hospital to get some peace and quiet. After a while, the Janitor has the door to the room covered with plaster and wallpaper, and when Dr. Cox puts his ear to where the door should be, the Janitor is dancing to "The Girl from Ipanema".
This trope is also averted in an episode of Stargate SG-1. Sam Carter and Jack O'Neill are standing in one of the lifts at the SGC, having a bit of an Uncomfortable Elevator Moment, and Sam starts humming the show'sTheme Song. Behind-the-scene commentary reveals that Amanda Tapping originaly wanted this to be the theme song for MacGyver (as an Actor Allusion to Richard Dean Anderson), but nobody could remember it right.
In the Stargate Universe episode "Epilogue", the elevator at the Teneran archives, which were created by the descendants of stranded 21st century Earth time-travelers, plays a Suspiciously Similar Song to "The Girl from Ipanema".
Used in the Burn Notice episode "Past and Future Tense".
Lampshaded in the Bones episode "The Mastodon in the Room". Sweets is playing "The Girl from Ipanema" on the piano when Caroline calls him to persuade him to give up his 10-Minute Retirement:
Sweets: I'm on sabbatical. Caroline: Doing what, installing elevators? Because I can hear the music.
This occurs in the Chuck episode "Chuck vs. The Nemesis". Especially comical because the elevator in question seems to be a coded-access elevator in a super-secret government facility.
Used hilariously in the episode "Eye of the Beholder" of Castle in a shot of a swat team riding a hotel elevator, with the very uncomfortable hotel manager, altogether very awkwardly with this music playing in the background.
Lampshaded on The Lazlow Show. Anthony Cumia (of Opie And Anthony) joked that the hypothetical Space Elevator would require the world's longest version of "The Girl from Ipanema" while you rode it.
Bleak Expectations: When the main characters are travelling into Hell via elevator, they hear three things: the screams of the damned, the pleasure of the masochists, and a "weird sitar version of the girl from Ipanema".
The Foo Fighters' "Monkey Wrench" video features Dave Grohl riding an elevator with a muzak version of "Big Me" playing in the background.
When the player enters any elevator in System Shock, the background music changes to a suspiciously "Ipanema"-like ditty. Which creates horribleMood Whiplash when you've just barely managed to blast your way through creepy dark areas full of creepy enemies while listening to creepy audio logs... and then you're in the elevator, and BAAH BAHH! BAH BAAAH BAH BAH BABA! Or when you exit the elevator and find yourself facing a room full of zombie mutants that want to eat your brains.
In Mother 3, while riding the elevator in the Empire Porky Building, you are treated to an "Ipanema"-style arrangement of the pig-masks' theme.
There is no actual elevator music in Iji, but Tasen logbooks boast that the lifts are equipped with music players and that they play such unforgettable classics as "exploding eardrums that are also on fire" and "Hel Sarie will kick you in the face".
The elevators in GoldenEye 64 feature elevator muzak arrangements of the film's Theme Tune. Strangely, these were absent from the game's spiritual successor Perfect Dark.
In Rise of the Triad, when you enter an elevator, there is a one in ten chance that this will play. In the remake, one of the levels has a segment which almost entirely takes place in a big elevator and which has a remade version of the tune.
A shout-out to the first game in Miranda's loyalty mission in Mass Effect 2: The team must take a particularly long elevator ride with elevator music playing in the background. Miranda slams the elevator's console with an omni-tool, and the elevator speeds up and the music stops. She really must mean business.
And in the Project Overlord DLC for the same game, the elevator music makes a comeback, while Shepard's team is investigating a crashed Geth ship. Hilarious, nightmarish-ly distorted elevator music while exploring a seemingly completley dead ship. It's even funnier the second time when you go back through that part of the ship later, with the same distorted music, while fighting off hordes of hacked Geth.
The music from Starship Titanic changes from majestic to tinny as you travel though the different class, suggesting the lower classes don't need good music.
Magicka spoofs this in the challenge map called "Caverns", where the players enter the arena through a wooden mechanical platform that is (somehow) playing muzak. Some of the later enemy waves also enter through the elevator, accompanied by the same chime.
Blood has this in all its elevators. If you shoot all the speakers, Caleb will say "Thank you."
Police Quest: Open Season has Ipanema-esque bossa nova music in the Parker Center elevators. One of these tunes was reused for the lobby music in Leisure Suit Larry 6. Another sounds similar to "How Insensitive", also composed by Jobim.
In American Mc Gees Grimm, pausing the game in any episode from the seventh onward results in a tinny Muzak rendition of the opening theme. The style and tinniness make it clear that this trope is being invoked.
Man 2: We could be priests of the new order, sanctifying the Metal Cube Room as an oracle and allowing only ourselves access, and only then on the solstice, and only then following a blood sacrifice from throngs of peasants who've made desperate pilgrimages to hear the faint, muffled strains of the muzak version of The Girl from Ipanema.
In the Futurama episode "Parasites Lost", Fry's duel with Lord Mayor of Colón is set to a thrilling swashbuckling piece, except for the part in the middle when they enter an elevator. During which they fight in silence.