Deke Shaw becomes this in Agents of S.H.I.E.L.D. when he manages to come back from the Bad Future they met him in and joins them in the present day. None of them like or particularly trust him after he sold out Daisy to Kasius, and so their treatment of him ranges from indifference to outright dislike. They only really let him stick around because he basically can't survive in the present on his own and, while something of a sarcastic Jerkass, he's really not bad enough to be deserving of being booted out to fend for himself. Good thing too, as it turns out he's the grandson of Fitz and Simmons. This eventually comes to a head when he snaps and calls everyone out for how badly they treat him, as he straps on a piece of experimental tech to his back to save the day to prove himself once and for all. It doesnt work as he didnt think his actions through, and they have to save him.
Deke: I built this company because no one liked me!!! I built it because I never belonged anywhere! Because the place that I'm from doesn't even exist anymore! And all of my friends are gone! And the woman that I gave lemons to thinks that I'm a loser, so I went out into the world to try and be what everybody wants me to be, and she still thinks that I'm nothing! And — and my best friend turned out to be a spy, and — and my girlfriend turned out to be a psychopath! And the family that I do have wants nothing to do with me! You try to be nice, but you didn't even want me to know that Fitz died! Even my own grandparents think I'm a joke. I survived an apocalyptic hellscape... so what do I have to do to get a little respect around here?
Angel: In Season 5, this is the role that Spike settles into when he finally decides to stick around. There are several gags where Angel refuses to put anyone important in danger — and then quickly agrees to send Spike.
It's never addressed, but it is made clear that Diggle, Roy, and Oliver don't particularly like Laurel in Season 3. Certainly they don't respect her and resist her attempts to join the team. Even after she joins, she's treated like an outsider. Diggle and Roy eventually soften their stance, Oliver... doesn't particularly.
Sheldon Cooper. It's lampshaded several times, like in a season 5 episode where, after Sheldon stops being friends with Leonard, the group—minus Amy—stops hanging out with him. Even Amy sometimes lacks the patience to pamper him and chauffeur him around the way he expects of Leonard. As for why he's this, well:
Seniority: The guys have known Sheldon for a long time and are aware that the chances of him finding other friends are pretty low.
Proximity: Sheldon and Leonard are roommates. Therefore, wherever Leonard goes, Sheldon usually goes. And wherever Sheldon wants to go, Leonard has to take him because Sheldon doesn't drive. Plus, he, Leonard, Raj, and Howard all work at the same place. As for Raj and Howard...
Penny: How did Sheldon get new friends in the first place? Howard:[shrug] We like Leonard.
Necessity: Despite all his quirks, Sheldon is a genius with an alleged 187 IQ and an eidetic memory. There are a few episodes where the other guys and gals take advantage of Sheldon's vast knowledge for their own needs, such as Penny using his marketing knowledge to launch her own hair accessories business or the other guys needing him for various work projects with which they are tasked.
Fear/Goodwill: Since it is nigh impossible to reason with Sheldon, nine times out of ten the others end up caving to his whims about whatever's happening. It doesn't help that Sheldon has occasionally shown the desire to harm or kill those who cross him. Which leads to...
Supervision: Genius-level intellect aside, Sheldon is pretty much an overgrown child who has No Social Skills, little empathy, trouble identifying irony and sarcasm, and a total inability to understand why anyone would find anything he says or does to be inappropriate, offensive or wrong. Therefore, the others, usually Leonard, Penny, or Amy, have to prevent him from doing something reckless or illegal, or get him out of trouble when he does.
Audience Popularity: It's easy to forget that Leonard is supposed to be the protagonist of the show, as Sheldon is the Breakout Character.
Caring: Sheldon really does care about his friends and vice-versa.
Howard is a downplayed example in early seasons. He gets along just fine with Raj (his best friend) and with Leonard, although sometimes they make fun of him, like all of them tease each other. However, for different reasons, both Sheldon and Penny strongly dislike him and are very vocal about it (in Sheldon's case, the dislike is mutual). Sheldon even said that everyone in the group (including Penny) is his friend, except Howard who is just an acquaintance. Penny tolerates him more in later seasons after he stops being a pervert, but Sheldon is still dismissive.
Amy was this at first in her trio with Penny and Bernadette, it becomes a plot point in one episode when Amy gets upset because the girls go shopping without her. She seems to mostly grow out of it as the three of them become better friends, and Amy even grew closer to Bernadette (even though she considers Penny her best friend). In one of the later episodes, we actually find her and Bernadette ditching Penny and hanging out together so they can have more intellectual conversations.
Of the three characters mentioned above, Anya by far tends to get it the worst, to the point where even calling her a friend would be a stretch. As badly as the gang treated Spike, he was still the only member of the gang who could physically fight demons and monsters the same way as Buffy. Cordelia was friends with them in high school and the only one with her own vehicle, able to provide them with rides. Anyas only connection to the group was that she was Xanders girlfriend, the others could barely stand her. Willow especially disliked her, leading her to say point-blank What do you bring to the group?
Depending on the Writer, Cliff. In many episodes, it's just Carla who hates him but in others, it seems like no one can stand his presence, and even Norm just barely puts up with him.
This is actually referenced in the Frasier episode The Show Where Sam Comes Back. In it, when Sam updates Frasier on the events at Cheers since he left, he mentions that Cliff hasnt been around since he heard about a new bacteria in beer, but that on the other hand, a lot of old customers have been coming back around, indicating that the latter of the two points mentioned above is true.
Diane had very strained relations with the gang sometimes. Again, Carla disliked her more than most, and that might have been partly due to envy over Diane's relationship with Sam, but Diane didn't have a lot of true allies at the bar. The only exception was Coach, with whom Diane had a surrogate father-daughter relationship. (This one has a Reality Subtext: nobody in the cast liked Shelley Long except for Nicholas Colasanto; he died midway through season three, leaving her without allies and probably contributing to her decision to leave the show at the end of the fifth season.)
Community: Pierce. His necessity is revealed when, in his absence, the study group begins to fight amongst itself for incredibly petty reasons just because they no longer have Pierce to kick around.
After Pierce died, the role fell to Ben Chang.
Britta increasingly rivals Pierce for this role as everyone in the group gets more and more tired of her loudmouth Know-Nothing Know-It-All antics. They even start using her name as a verb meaning "to ruin something". Ultimately downplayed, since she still tends to be on relatively good terms with everyone else in spite of this and, unlike Pierce, her status as a member of the group is never once called into question.
Tom, who lives on the other side of Jules from Ellie. He's incredibly creepy—him walking up to a table at a crowded restaurant and asking for sugar will make everyone flee. The group tolerates him because he's a neighbor and also because he'll do anything they ask.
Holly is almost this. Holly is only around because she's Grayson's baby mama. Laurie likes her because they were already good friends, and Travis likes her because she's hot and they made out once, but no one else likes her and Jules outright despises her. But she's Tampa Jill's mother, so...
Coupling: Jane. The other five characters were connected fairly well. Jeff was good buddies with Steve, who became good friends with Patrick, who was Amicable Exes with Susan (who was dating Steve and co-workers with Jeff), whose best friend was Sally. Jane was Steve's ex, but they were far from amicable; in fact, Steve would be happy if he never saw her again. Patrick and Jeff were mostly indifferent to her (although Jeff did develop feelings for her later, and Patrick slept with her once, as he did every other bipedal female in London), and the girls weren't especially fond of her (Susan kept comparing herself and her relationship with Steve to her, and Sally just found her annoying). The only real reason she was still around was that she was so self-obsessed she honestly didn't know how much everyone else disliked her.
James from Derry Girls isn't really well-liked by any of the girls. Or any of Derry for that matter. Mostly because he's an Englishman in a very not-English friendly town.
A Different World: Whitley Gilbert from Season 2 on; she's made the protagonist following Denise's departure and due to her being someone's roommate or being in charge of something on campus (not to mention Dwayne Wayne's girlfriend), she's not going anywhere... at least until the series finale.
Doctor Who: Fifth Doctor companion Vislor Turlough. Even after he rejected the Black Guardian's mission to kill the Doctor, he was still a bit of a self-serving jerkass. Tegan was still more than a bit wary around him and The Doctor was aware that a leopard doesn't change spots overnight.
Firefly: Jayne Cobb, to the point where the others don't even bother with the "wait until they're out of the room" part. When the crew is discussing what to do with River, a mentally unstable girl who may or may not be a living weapon, Zoe says she's never hurt anyone. When Jayne points out she sliced him in the chest with a butcher knife without provocation, Zoe amends it to "anyone we can't spare." He remains on the ship because he gets money, and they keep him because he's good with weapons and usually doesn't sell them out.
Seth from For the People is the least popular lawyer on the Prosecutor's side because he lost his first case thanks to it being against his girlfriend Allison.
Fresh Meat: JP is this. Though the others warm to him a little over the course of the series, he remains a source of constant annoyance.
Kimmy. She and DJ are best friends, and Kimmy is also their next-door neighbor, so DJ's family members tolerate Kimmy the best they can, though they won't hesitate to snark at her when they see fit, which occurs a lot as she's also a Drop-In Character.
Aaron is a classmate of Michelle's, so he's around whether Michelle and the other classmates like it or not. He's eventually accepted into Michelle's social circle and becomes a friend as well, though it doesn't stop him from being a Mouthy Kid.
Glee: Rachel and Santana were kept around for their musical talent, not their personalities, though they did eventually warm up to everyone else by graduation.
Barney. This is actually the topic of an entire first season episode, where Ted tries to recall exactly why they were friends with him. He concluded that it was because the zany antics that Barney invariably got them into tended to make life entertaining. This trope is played straight especially in earlier seasons as most of the characters admit to having a "Barney Limit." When Barney slept with Robin, Ted explained his anger at Barney isn't simply that he slept with his ex, but that he assumed that if Barney had any sort of "limits," it would have been anything regarding him. It isn't until after they reconcile that Barney starts being treated more as a real friend and less of a nuisance.
"If you moved away, I'd have to follow you. Then Marshall would follow me, and Ted would follow Marshall. The only upside is that we might lose Barney."
Ted's old friend Adam "Punchy" Punciarello and ex-girlfriend Karen aren't well-liked by the gang, either, as Punchy is a jackass who makes fun of Ted and punches him in the arm repeatedly, and Karen was a stuck-up snob who frequently disparaged Marshall and Lily, and would constantly cheat on Ted.
It tends to be more that Ted reverts to his high school self when around Punchy and the worst part of his college self around Karen. Punchy actually travelled from Ohio to New York when a phone call gave him the impression that Ted needed a friend. Karen was pretty terrible, however.
iCarly: For Freddie and Gibby and anyone else who might be friends with Carly, Sam is this through Seniority, Fear, and Audience Popularity.
Impractical Jokers Murr is the Butt-Monkey of the group who is always picked on by the other guys and his punishments are noticeably more brutal than everyone else's (though Sal is a very close second). Sal seems to be the one who likes Murr the least since they always quarrel with each other in group challenges and it's even implied in one episode that he probably wouldn't be friends with Murr were it not for Joe and Q. But Murr is kept around due to seniority (they've known each other since high school), proximity (he was Joe's roommate for a while), and because they really do care.
Joe: I can't stand Murray. I love him—doesn't mean I can stand him.
Almost every episode or situation has one of the four lads being this: Will for being too geeky and an annoying newcomer to the group; Simon for obsessing with Carli at inappropriate times, often being a "hos before bros" kind of guy; Jay for just being a Jerkass who is bullshitting the others with made-up sex stories; Neil for being too stupid to understand basically everything. In general, Will and Jay are the worst offenders. The reason they are hanging out is, exactly, that they are all "in-betweeners": They seem to be the only students at the school who are neither complete losers nor popular or socially adept, so they only have each other.
Jay tends to be the biggest Jerkass and liar of the group, but is still childhood friends with Simon, making it an example of seniority.
Dee is always mocked within the gang, whether it be for her looks or being "The Useless Chick" of the group. Deconstructed in "The Gang Broke Dee"—she becomes depressed and more insecure to the point where she preemptively mocks herself. A dark Reconstruction later occurs when it's revealed the gang planned to show her things could be worse by making things even worse, and she goes back to her normal angry self. However, a later episode reveals that Charlie actually values their friendship and doesn't like mocking her. He just does it to stay in Dennis and Mac's good graces.
Depending on the episode each member of the group has had this particular moment. In fact, one episode had the group (temporarily) break up because they couldn't stand a particular quirk that each member has.
Mirabelle of The Kicks. She's outright called "mean", "scary", and "annoying", but her teammates still consider her a friend (it helps that she's a Jerk with a Heart of Gold).
Lab Rats has Chase. Mostly because of his Type A personality.
Phil Tandy Miller in early episodes of The Last Man on Earth is tolerated as best by the group. And no one is hesitant to tell him just how completely insufferable he is, and that none of them would spend a second with him if the world hadn't ended. As the show progresses, Phil experiences some Character Development and becomes the de facto leader of the group.
Foggy is definitely this most of the time. He's bossy, delusional, pompous, and hypocritical, and unlike the likes of Blamire, Seymour, and Truly, seems to have no sense of humor most of the time
Compo:[about Foggy] Nice fella. Nobody likes him.
Howard, who is constantly badgering Clegg to be the go-between for him and Marina—the woman he's cheating on his domineering wife with. Not to mention he's misogynistic, whiny, cowardly, and always ready to leave Clegg holding the bag if they're ever caught. Even Foggy finds him annoying, and the trio is always willing to drop Howard in his own mess in return.
Misfits: Although you could argue that most of the main characters are this to some extent (they're a bunch of kids on community service, so they have literally no choice but to spend time together), Nathan is the one who causes the most flinching and eye-rolling among the others, due to his loud personality and anti-social behavior.
Ralph Mariano becomes this after Earl's HeelFace Turn. He is a worthless thug whose shenanigans usually interfere with Earl crossing things off his list. He also makes it no secret that he wishes Earl were bad again (since Earl was essentially Ralph's mentor when they were kids). He tried to follow Earl's lead by going legit but a few hours and a non-winning lotto ticket later, he gives up on it and attempts to rob Earl (and fails). His Karma Houdini status in season 3 causes Earl to temporarily give up on karma and go back to being bad. However, Earl punches out Ralph at the end of the episode and he's never seen again after that, implying that Earl finally cut things off with him.
An early episode centered around Philo, a suicidal man who was on Earl's list because Earl had previously stolen gas from him. Philo forgives him, but after witnessing a few suicide attempts, Earl sticks around to try and give Philo a reason to live. Only problem is that Philo is rather homely, rude and boring, annoying Earl, Randy and everyone else to no end. However, at the end of the episode, Philo no longer wishes to kill himself because he views Earl and Randy as his friends and invites them to hang out. Despite admitting (behind his back) that they don't like him, Earl and Randy agree to spend time with him regardless, since they feel a sense of obligation to a man who decided to live because of them. Philo is never seen after this episode, so it's likely that they did eventually ditch him.
The Nanny: C.C. Babcock. Apart from Maxwell Sheffield, nobody in the Sheffield household particularly likes her, especially Niles, whose frequent verbalsparring with her is one of the funniest aspects of the show. This gets turned on its head in the last season — C.C. and Niles find themselves falling for one another and actually marry in the finale.
The Office (US): There are several characters who aren't that well-liked by their coworkers at the titular office for varying reasons:
Michael, the regional manager and highest authority in the workplace, isn't liked by the others for his antics, offensive behavior, emotional neediness that leads him to try and befriend his employees, and generally unprofessional conduct. However, he doesn't get shunned for his antics as much as others, because the workers know he isn't trying to offend them and is just horribly socially incompetent rather than malicious. Notably, they'll actually join in on some of Michael's stunts of their own free will and typically treat him better if he isn't trying too hard to win them over.
Dwight's the biggest case because he's power-hungry, prone to paranoia, has a disproportionate opinion of himself in relation to his actual capabilities, lets what power he does get go right to his head, and is a Yes-Man to whomever he thinks will get him more authority over others. Even Michael tries to avoid him if he can, and the only thing to a close friend he has at the office is Jim, who pranks Dwight nonstop and succeeds because no one wants to tip him off because of his behavior.
Andy falls even lower than Dwight at times because of his ego and bizarre behavior, while lacking the salesman acumen that Michael and Dwight have.
Ryan's a Jerkass with an ego who actively disdains everyone around him. The only people that actually want to be anywhere near him are Kelly (who dated him for some time and still holds romantic interest in him) and Michael (who has a man-crush on him), but even they eventually get fed up with his behavior. He only still has a job at the office because Michael was able to negotiate a deal with Dunder-Mifflin to get him hired back after being fired.
Regina, the former Big Bad of the series, who's kept around mostly because of Proximity due to being Henry's adoptive mother, and due to Control on the part of Emma, who only knew her as Mayor Mills, a mostly harmless, if corrupt, manipulative, and jealous woman, not a mass-murdering dictator.
Rumplestiltskin, an Evil Sorcerer who's mostly kept around because he's a lot more controllable than the other villains, given that he's pretty reasonable to anyone unless you happen to hurt Belle or make a deal with him. In fact, given the choice between saving him and Cora, the entire group actively chose him. Unlike Regina, he takes a while to claw out of this position, with the group only barely accepting him after he kills his own mother, which wasn't even a particularly selfless act. His full redemption only kicks in at season seven.
Zelena possibly has it worse. She was kept around in season five mostly due to being pregnant with Robin's baby, and after that, solely because she happened to be the one who knew Hades' secret. Even in season six, after she's considered at the very least neutral if not reformed, Regina still blames her for an admittedly small part in Robin Hood's death, resulting in a lot of tension; the Charmings don't even bother with her, for the most part. In season seven, she's still shown to be relatively isolated and close to only her adult daughter Robin, as Regina, the sister she still has a tenuous relationship with, and Belle, her only friend, wandered off to the New Enchanted Forest and left her alone in Storybrooke. She develops a strangely endearing friendship with the Wish Realm version of Hook, eventually. It's quite telling that her happy ending instead of consisting of being a part of the Charmings' family, is instead to create her own family with a loving, non-fairy tale husband in San Francisco.
Jerry from Parks and Recreation is the office Butt-Monkey, usually for no apparent reason. The only three people who treat him with genuine kindness and even friendship are Leslie, Ben, and Donna. The former two were the only ones who attended his funeral during the Grand Finale. Donna also ensured that he would be known by his actual name, Garry, by labeling his place at her wedding with it.
Piece Of Cake is a World War 2 series about British fighter pilots. Moggy is a sociopathic bully that the rest of the characters would love to be rid of. However, he is also a hell of a pilot and keeps coming back from missions while other characters keep dying. The surviving characters keep hanging out with Moggy because he is a familiar face in the sea of replacements and they do not want to befriend the New Meat. When Moggy is killed in the series finale, only one of the original pilots is still alive. He is not really saddened by Moggy's dead but by the fact that the last reminder of a happier time is gone.
Bulk & Skull from Mighty Morphin' Power Rangers only hung out with the Rangers due to proximity and Skull's crush on Kimberly. However, for as often as they were disgusted with each other, they still occasionally showed genuine friendship.
Power Rangers Dino Thunder: Cassidy and Devin were basically Bulk & Skull's arc condensed into 38 episodes, and by the end they each earned a genuine friendship from both Ethan and Kira.
Power Rangers Mystic Force: Leelee initially only hung around to try and get into Nick's pants. However, after The Reveal that she's the daughter of one of their enemies, they all outright hated her, but were stuck with each other when Leelee was hired at the record store.
Alison is this before she's murdered since she tended to make all of the girls feel as miserable as they did special. After Ali's return to Rosewood, the girls don't see her as one of them, and often reject her attempts to reclaim her Alpha Bitch status. On two occasions, they have accused her of murder with significant ramifications, and they don't trust her, often discussing her and analyzing her actions like a stranger or enemy.
Mona is also this to the Liars. Even before she was revealed as A, only Hanna liked hanging out with her. After she is revealed to be A, she's generally kept around because she's useful and Hanna still likes her a little.
Rimmer is essentially a combination of answers 1-3. He and Lister are roommates, Lister would probably go mad from loneliness if they tried to live apart (he says at one point that messing with Rimmer is what keeps him going), Lister's only other alternatives for conversation are a Human Alien whose personality can be summed up as "dumb, self-centered and vain" and a fawning robot whose idea of fun is hanging out laundry, and Rimmer is the last lingering connection Lister has to his life before everything went to smeg. Besides which, depending on the episode, either Rimmer has hidden most/all of the other hologram recordings, or else Lister is such a laid-back slob that most other crew members would rather be dead than be his hologramatic partner. In essence, Rimmer gets left online because it'd be even worse to have him switched off. And then there's that episode where Rimmer finally contrives a way to have two holograms running at once, and then duplicates his own hologram disc (have we mentioned he's a chronic narcissist?) and then discovers he can't stand himself either.
In a rather sad example, Adam Rhodes ends up as this later on, when the poor guy doesn't deserve it. Jeff excludes him as much as possible, when not outright mocking him. Russell does outright mock him, as does Timmy at times. Audrey seems apathetic to him, and it seems the only reason he's dealt with is that he's engaged to Audrey's best friend Jennifer. The worst part is he's one of the only (along with Timmy) Nice Guys in the cast.
Saved by the Bell: Screech is good friends with Zack but merely tolerated by the rest of the group (and outright despised by Lisa). They all like Zack and Screech is part of the baggage. He seems to have grown on the rest of the group by the end of the series though.
The Secret Circle has Jake, who is only there because he's part of the circle. Cassie is the only one who likes him, and Diana seems to be the only other person who tolerates him. Later, John Blackwell, despite being told is several times that he's evil (which he is), is only around because he's Cassie and Diana's father.
Newman. He and Jerry have a mutual animosity and the only one who seems to hang out with him in any friendly sort of way is Kramer.
George Costanza comes off as this, Depending on the Writer. In certain episodes, Elaine can't stand him while Jerry considers him an acquaintance at best and most likely hangs with him out of pity. He and Jerry have also been friends since high school, so he's also got seniority going for him. Humorously, he thinks Elaine is the one nobody likes in their group.
Skins has several, though each of them gets better at the end.
Tony from the first generation, to a degree. He isn't seen as such at first when his Jerkass and screwball prankster tendencies are known mainly by his girlfriend Michelle and best friend Sid who are devoted to him (although the more sensitive members of the group, like Cassie and Jal, express their distaste with Tony's behavior early on). Over time though, when he manages to alienate these two, it becomes apparent that no one in the pack is willing to side with Tony.
Generation Two has Cook, with whom Effy is sleeping and to whom JJ is loyal to in a similar way Sid was to Tony. Also there's Katie, who's Emily's sister and dates Freddie at some point, and is a wannabe queen bee with not that much regard for what other people think of her.
For the third generation is Mini, at first seemingly a queen bee for whom the gang quickly loses patience. Liv even points it out twice, declaring in the fifth series that 'she loves [Mini] despite or of her flaws but she [Liv] is the only one left' and stating in the sixth that she's friends with Mini "because somebody has to, but it's a tough duty".
The Sopranos: The Mafia is full of assholes and sociopaths who are supposed to act like friends, but generally speaking members of the same crew are friends, or at least on friendly terms. Not so much for Ralph Cifaretto, who is such an unpredictable hotheaded asshole that absolutely nobody in the Jersey family cares for him one bit. The family mostly lets him stick around because (1) he's a made man and (2) he's a great earner. Nobody mourns him when he dies.
Pre-Character Development, Rodney McKay of Stargate Atlantis. He had no real friends when he first appeared in SG-1. He was extremely arrogant, condescending, full of himself, and outright sexist, and the rest of the cast tolerated him at best. He didn't really deserve any better. But as time went on, even though it took him a rather long time, he's becoming less annoying and more accepted by others.
Stranger Things: Max starts out as this, with Lucas being pretty much the only one who likes her from the start. The rest of the party is rather wary of her since shes pretty much a walking Masquerade violation and a Grumpy Bear. Mike outright hates her at first, seeing her as a Replacement Scrappy for Eleven. It takes most of season two for them to warm up to her, and even then Mike seems to more tolerate her presence than outright like her.
The Tales from the Crypt episode "House Of Horror" has Les, who treats his pledges like his own personal servants/slaves and acts obnoxiously to his fraternity brothers. His fraternity brothers talk trash behind his back and pledges only tolerate him to become members. Les also blackmailed the Dean with evidence of a cheating scandal to obtain the position of pledge master. Les has also gotten away with this routine for six years already, because according to the pledges, "People like Les Wilton don't graduate."
Louie de Palma on Taxi. He treats everyone at the Sunshine Cab Company like absolute garbage, never missing an opportunity to insult, degrade, or exploit them, and they all respond to him with equal loathing. However, despite his rotten exterior, Louie's got a bad case of I Just Want to Have Friends, and since he's too repellent for anyone to willingly spend time with, he uses what power he has over the cabbies to wheedle or cajole his way into their social gatherings.
That '70s Show: Jackie, at first, was only in the group because she was the girlfriend of one member, Kelso. Later, though, she became a regular friend.
The Party Planners sketches from That Mitchell and Webb Look were based around this. The characters would be planning a party and discuss inviting someone only to raise a concern that the person might bring someone that they can't stand. For example, Moneypenny bringing James Bond or Velma, Daphne, and Fred bringing Shaggy and Scooby.
Slugs from This Country. He specialises in turning up uninvited, outstaying his welcome, and being "utterly annoying". He was at school with Kerry and Kurtan and it's possible that they hang out with him because all of their other friends have moved on and left the village and they're bored. Also because it's such a tiny village and he's hard to avoid.
The Vampire Diaries: Damon, initially. The main reason they keep him around is that he's Stefan's brother. However this is played straight mostly in the first few seasons (and in season 5, because he Took a Level in Jerkass). As of season 6, he's on relatively friendly terms with everyone, including Bonnie and Caroline, who used to hate him.
Trina Vega tends to be the butt of all the jokes. Jade—in two different episodes—even tells her, "No one likes you!" Being Tori's sister, the group usually has no other choice but to include her, especially since Trina usually forces her way in.
To some extent Robbie, since his friends constantly act like jerks to him. Pity is likely why he's kept around.
In season three of The Walking Dead, Merle was this for the short time he was with the group. Nobody liked him, and he was best remembered as a racist and unpleasant Jerkass. Most people tolerated him because he was Daryl's brother, but even Daryl started to get fed up.
Roy Biggins on Wings. Hated by all the other characters, who he hates back in turn, he still ends up inserting himself into their lives far more than "works at the same airport" really calls for. Despite his anti-social tendencies, Roy still desires some form of companionship, and is indifferent enough to other people's feelings that he's willing to force his company on them regardless of how openly they resent his presence.
In Wolf Hall, Thomas Cromwell and Lady Jane Rochford aren't popular at court. For Cromwell, it's because of his low birth and enigmatic past and motivations; they see him as an untrustworthy interloper in the circle of titled gentlemen around Henry. Lady Rochford constantly picks fights with Anne Boleyn and insults people beneath her to deal with the unhappiness of her marriage. It's not surprising that they end up working together.
On Would I Lie to You?, a bit of a minor Running Gag is that host Rob Brydon is this trope behind-the-scenes, and team captains David Mitchell and Lee Mack expend as much energy as possible trying to escape from him in social settings.
The Young Ones: Rick. No one likes him and they have even told him that. When introducing the gang to his mother, Vyvyan called Mike and Neil his friends, but called Rick "a total bastard I know".
Young Sheldon has Dr. John Sturgis, Sheldon's theoretical physics professor and Meemaw's boyfriend. Other than those two, nobody in the Cooper family likes him. Missy is the most vocal about it, though it's implied that she's angry at him for breaking up with Meemaw after his stay in the mental hospital. Mary and George Sr. are uncomfortable around him, but the former pushes the latter to start hanging out with John because he has no other friends, to which George agrees to out of pity. Georgie seems to at least tolerate John, asking uncomfortable questions that John is perfectly willing to answer. Aside from being a bit awkward, John hasn't really done anything to deserve that kind of scorn.
Logan, due to Proximity. Being Chase and Michael's roommate, he regularly hangs out with the main group, yet Zoey and the others openly dislike him and think he's a jerk. He actually serves as the main antagonist in a high number of episodes (recurring plot: Logan does something jerkish and all his "friends" punish him).
Chase: I know she'd never date a jerk like Logan. Lola: He's one of your best friends! Chase: Which is how I know he's a jerk.
Quinn in the early seasons. Not because she was a Jerkass like Logan, but she was treated like a freaky nerd by most of her friends. She becomes more normal in later seasons.