Ed Sheeran made a headline-grabbing performance on Game of Thrones last Sunday, sending fans into a tailspin on social media. The British pop musician showed up on the hit HBO show Sunday, singing a few lyrics from a song originally written in author George RR Martin’s A Song of Ice and Fire series — the novels that inspired the TV show — and sharing food and wine with some mates by the campfire.

Industry insiders say that cameos like Sheeran’s can give stars a boost in press and visibility — but they’re mostly for fun, or are favors that entertainers and filmmakers can do for one another if they have an established working relationship.

“I think a well-positioned cameo is a creative way for a filmmaker to cast a role and give a nice surprise to an audience, while giving an actor the freedom to take a role for the joy of it,” says Meredith Fine, Director of the Youth Division at Coast to Coast Talent Group, an agency in Los Angeles.

“Cameos aren’t the kind of work that stars need to do, but more something they want to do,” Fine tells Moneyish. “It’s probably a lot of fun.”

And sometimes the cameo is the thing you remember most about an episode. That’s why Moneyish rounded up some of our favorite cameos by A-listers over the years. Take a look.

1. Taylor Swift’s “Bad Blood” music video — Released in 2014, this T-Swift video follows a group of daring women doing battle — first with their male enemies and then with each other. Big names include Selena Gomez, Gigi Hadid, Jessica Alba, and others. This video isn’t the only time Swift has asked her famous friends to appear in her work; she’s invited performers like Idina Menzel, Keith Urban, and Wiz Khalifa to join her on stage during previous concert tours.

2. Pharrell, Maria Menounous, Mike Tyson, et. al. in Entourage, the movie — There are too many stars who made cameos in the 2015 film tribute to the Entourage franchise to name them all, but that makes sense given that the entire brand centers on life in Hollywood. One of the stranger names in the mix is billionaire Warren Buffett, who confessed that: “[The writers] wanted me to say something I wasn’t going to say,” in an interview with Yahoo.

3. Stephen Hawking on the Big Bang Theory — The English theoretical physicist and professor at the University of Cambridge gave Big Bang Theory character Sheldon Cooper, played by actor Jim Parsons, the thrill of a lifetime by agreeing to meet with him on the show. “Professor Hawking, it’s an honor and a privilege to meet you, sir,” Cooper fawned when he met Hawking. “I know,” the professor, paralyzed and speaking through his famed robotic voice generator, replied.

4. Ben Stiller and Luke Wilson in Anchorman: The Legend of Ron Burgundy — In the 2004 cult classic starring Will Ferrell, these two stars participate in the vicious battle scene between anchor teams at three San Diego news stations. In real life, Stiller, Wilson, and Ferrell are part of the “Frat Pack” — a group of actors who have collaborated since the 1990’s.

5. Billy Crystal and Robin Williams in Friends — These legendary actors popped up at the famed Central Perk coffee shop during the Friends’ third season in 1997. In their scene, Williams, who passed away in 2014, stirs up some chaos before storming off set. They weren’t the only stars to appear on Friends — others like Reese Witherspoon, Brad Pitt, George Clooney, and Charlie Sheen were part of the Friends legacy, too.