The slave girl Morgiana from Ali Baba and the Forty Thieves, regarded by many to be the true hero of the story. Not so much happy as she is content with her situation, she shows Undying Loyalty both to her first master Cassim, and then to Cassim's brother Ali Baba, who inherits all of Cassim's property, including Morgiana, after Cassim is murdered by the Forty Thieves. Several times, Morgiana cleverly protects Ali Baba and his family from the bandits' attempts at murder, until the climax where she kills the disguised bandit leader. At the end, Ali Baba grants her freedom and betroths her to his son.
This is considered unusual, but not unheard of, whenever someone in the Animorphs series finds out about the Yeerks. The Taxxons in particular deliberately joined up en masse in the hopes that being controlled would help restrain their Horror Hunger. (It didn't work—they're still compelled to eat anything edible in sight, including the intestines of their former allies. Depressing, not to mention disgusting, but you can see why they tried.)
This is also the case with voluntary human hosts and, more mildly, the Yeerk Peace Movement, which advocates for cooperation with one's host. Some of the characters distrust the Peace Movement, viewing it as just a milder invasion, but Cassie is sympathetic to it and at one point even volunteers to host the friendly Yeerk Aftran.
In the Apprentice Adept series, many Proton serfs will try to extend their tenure by entering The Great Game, despite the fact that they're basically virtual slaves (their sole right is to terminate their own serf contract and leave the planet with nothing) who live at the sufferance of their "employer" Citizens (who are only barred from killing a serf without cause or permanently injuring them) and a serf's contract payout would let them live out their lives comfortably elsewhere in the galaxy. The prize at the end is full Citizenship, but many just hope to get to the later rounds, which offer tenure extensions.
The androids in Argo have no rights but are (mostly) programmed without any more than a rough resemblance of emotions, so they don't mind being used as slaves at all.
The Bartimaeus Trilogy has two types of this. Bartimaeus and Ptolemy, Ptolemy being the master who proves to Bartimaeus that they're equals and later lets himself die to save him. Also Nathaniel and Bart, after constant sparing and proclaiming their hatred for each other, at the end of the trilogy...though neither of them would say it outright. The care coming from Nat, unknowingly, doing what Ptolemy did by letting him go when he was going to die.
And then there's the darker type in the prequel The Ring of Solomom with Khaba and Ammet. It's a mystery why Ammet even likes Khaba let alone 'loves' him. He's called 'Khaba the Cruel' for a reason.
An interesting variation shows up with the Nadraks in The Belgariad. Nadrak women are defined as property—but they take great pride in the prices they are able to command (especially since they get to keep a portion of it), and retain the right to choose when, if, and with whom they have sex (a right they usually back up with a pair of very sharp knives). Considering the way women are treated in other parts of the world, the arrangement isn't all that bad.
Originally this was going to be closer to the trope, according to the Rivan Codex, but then Eddings actually started writing. The instant he created a female Nadrak character, the entire dynamic changed for what even he admits is the better.
Polgara, disguised as a Nadrak woman, has a certain amount of trouble comprehending her exact status. Though technically 'property' she is in fact perfectly free to go wherever and do whatever she likes as long as she has a good dinner ready for her master at every evening.
Holker is this to Belisarius. Justified in that Belisarius was from a civilization where slaves had at least some rights and Holker expected to be sold in a place where slaves had none. Also justified in that Belisarius wanted him as an honored scribe instead of the beast-of-burden he had been intended as, gave him a cause to serve, and promised him freedom.
Similarly the Kushans captured at the Battle of Anatha are rather amenable to Belisarius' service partly because they were treated as slaves before anyway and partly because they sort of consider it fair play now that they have surrendered.
Rana Sanga has a Pathan Scarily Competent Tracker who when captured by Sanga in a duel requested that he be Sanga's slave instead of being sold, because he considered that if he had to be a slave he wanted to be a slave to a badass. Pathan are like that you know.
Subverted in Herman Melville's Benito Cereno. Captain Delano thinks that the slaves are content, but in fact they have revolted and taken over the ship. If not for his own prejudices this would be obvious to him.
Played straight in Charlie and the Chocolate Factory with the Oompa-Loompas, who gladly do all of the physical labor (which is at least intended to be safe) in Willy Wonka's famous chocolate factory and get his products tested on them before they have any idea what the products do, in exchange for housing and all of the cacao beans and chocolate they can eat. On the other hand, not only are cacao beans their absolute most favorite food, their homeland is explicitly described as a terrible place where they tried and failed to avoid being eaten by the dozens by a variety of giant predators by living in the trees, and living off a diet that primarily consisted of mashed caterpillars, bark and beetles.
Firs, the old footman and former serf of the Ranevskaya family in Anton Chekhov's The Cherry Orchard, continues to work for the family after the abolition of serfdom and even denounces the emancipation as the worst evil that could have possibly befallen Russia's serfs. More generally, it is itself practically a trope of late nineteenth century Russian literature to depict the serfs as having been better off before emancipation. Chekhov again features wonderful examples in his short story "Peasants."
Considering how much life has always sucked for the Russian poor, right up to the present day, it can be argued that "freedom" (especially the kind where the State says you're free, but...) does not offer much practical benefit.
Codex Alera contains a device called a "discipline collar," which binds someone to the will of a specific master. Obeying orders provides sexual pleasure, and disobeying them provides horrendous pain. Nobody in the series can resist the control for longer than a few minutes unless they've got two collars from different masters, and one character who spent several years collared remarks that after a while you start to only scream on the inside, even begging for orders to obey. This is portrayed as significantly less sexy than many writers would portray it.
Haydee from The Count of Monte Cristo is completely in love with her master the Count. Apart from the obvious problems modern readers have with slavery, some of the Count's comments about her before her love is revealed make him seem like a monster.
Near the end it's made clear that the Count apparently never took advantage of her, being still too tied with his feelings to his lost love, and only made the comments to appear like an eccentric foreigner and to avoid inconvenient questions of why a man of his status doesn't get involved with women; yes, keeping a sex slave was a more acceptable explanation than the assumption of homosexuality or impotence. Unless a man was a priest (though, they did sometimes have mistresses), a widower within a certain time frame, or medically incapable, it was expected during that time period that they were involved with some woman or women. If not, people wondered why and wouldn't buy 'yeah, I'm just not interested in anyone at this point in time'.
Ali is also an example, although he isn't in love with the Count like Haydee is.
Both are pretty clear examples of the first type of this trope, because while Monte Cristo makes demeaning comments about them in front of other characters in order to keep up his reputation as a ruthless genius, the scenes where no outsiders are around make it quite clear that he actually cares for and respects Ali and Haydee a great deal, and treats them exceedingly well, even offering them their unconditional freedom basically whenever they want it.
Note that Haydee, unlike most slaves, has no real life to return to. Her father was deposed and murdered, her mother died of grief, and her service to the Count enables her to take revenge on the man who betrayed her family and provides her with incredible luxury.
Golems, have a mixed attitude to this. They continue to bring buckets of water from a well until everything is flooded if no one tells them to stop (arguably they do this as an act of rebellion: they aren't expected to think, and so they don't). Feet of Clay revolved around a group of golems creating a golem king to lead them to freedom - then selling him, because a golem must have a master. Those that are freed continue to work all the time, except for periodic holy days were they rest, because they're not tools. One golem upon death elected to remain in the eternal desert rather than travel it to another destination as most people do, considering an empty plain with nothing to do and no orders to follow freedom.
Also deconstructed by the slaves of Discworld's Ancient-Greece-like nation of Ephebe, where a slave has much better living and working conditions than a poor free man. In fact, the only reason Ephebean slaves want to buy their freedom is so they can have to option of owning slaves of their own. Ephebian law protects the slave's living conditions as property law. No man is allowed to harm his property. So even if a free man is reduced to eating his own leather shoes, he is still required by law to ensure that his slave is well fed and kept in good living conditions. (According to the Discworld Almanack, Ephebe was the location of the world's only Slaves' Volt - a "volt" being the opposite of a revolt).
Used again in Discworld (but rather more seriously) in Interesting Times, with the worryingly obedient people of the Agatean Empire (the China/Japan analogue). The masters don't need whips; they have something worse.
Discworld Igors are an odd... something... of this trope. They are at their happiest when they have a properly insane "Marthter" to serve (and occasionally shower with spittle when attempting to pronounce words with lots of sibilants), yet have absolutely no compunction about legging it out the back door with the glassware to seek alternative employment a minute or two before the pitchfork-and-torch-bearing mob breaks down the front door. An Igor must serve, but who they serve seems to be largely irrelevant.
The Igor in Carpe Jugulum is unhappy because his new masters don't want spider nets all over their place and are, all in all, much too modern to be proper vampires. He is very attached to his old master, a more traditional vampire, whose shoes he used to lick clean, despite not feeling worthy to do so, as he explains to Nanny Ogg.
Gaspode the Wonder Dog is torn between his street-mutt independence and a nagging doggy compulsion to serve a master. He is well aware of this inborn streak of servility in canines, to the point of using it (and his gift of human speech) as a weapon against hostile dogs: "SIT!"
Sergeant Angua (a werewolf) compares her relationship with her commanding officer and boyfriend Captain Carrot to that between a dog and her master, and not in a negative sense. Make of that what you will - but remember that Carrot doesn't share this view.
Vimes is an odd example of this, too. Everyone seems to consider Vimes to be a servant/slave to someone or something, but nobody can agree on what. Vimes considers himself to be a servant of the law, and wouldn't have it any other way. Many others consider him to be a slave to Vetinari; in several books he's called "Vetinari's terrier" and parallels are outright drawn between Angua's situation and Vimes's; Angua even says, "It's all right. Sooner or later, we're all someone's dog." He wavers back and forth on whether the description is accurate, but regardless of whether it is or not, his own stubborn bloody-mindedness won't let him change his actual behavior.
Leonard da Quirm has been kept prisoner by Vetinari for years and has only been allowed out on three occasions since that was revealed, with the third arguably being a delay of locking him up until he finished another project. As far as he's concerned, his prison is a comfortable, well-equipped, rent-free workshop where he can dabble in whatever matter comes to mind without being disturbed by anyone other than the Patrician.
Properly speaking, that's precisely what it is, and not a prison at all. Leonard even walks right out of it without any difficulty on one occasion when he needed to (with considerably greater ease than the Patrician, who has to think precisely what the traps are going to be on the particular day and time he's passing through). It would seem the security measures (meant to keep the potentially very dangerous things Leonard invents from falling into just anyone's hands) were one of the very few specific tasks he's carried out in the job.
And confirmed when at the end of one of the books, he returns to his room, locks the door, and slips the keys outside under it. Without Vetinari looking over his shoulder (directly) or even saying anything.
Subverted with Oreg in Dragon Bones. He comes to like and respect his new master Ward, and in once instance clings to Ward's leg when he is summoned after they'd been separated for a long time. However, this seeming display of affection is because the magic that binds him to Ward makes him suffer terribly when they're apart. When he eventually behaves in a happy and content way, this is because he has come to trust Ward to do the right thing - and the right thing is to kill Oreg, something which only his master can do. A straight example is Bastilla who seems to enjoy being a slave. Oreg mentions that he could break the magical bond, but only if the slave really, really wanted it. He comments that this is not the case. Of course, with the magical Mind Rape that is possible in the setting, it is hard to tell whether someone is genuinely happy or just manipulated into believing it.
While the Draka series is full of first-generation, newly-caught serfs who deeply resent their slavery (having been born free), many serfs born into and raised in serfdom actually enjoy the security of their lives. Some "new-caughts" like Solange in Under the Yoke also completely break down mentally, becoming co-dependent wrecks. Of course, given that the Draka ruthlessly exterminate any serf who shows signs of open rebellion, the ability to resign oneself to slavery is an evolutionary survival characteristic in the serf gene pool. Later on, the Draka perfect human genetic engineering and simply rewire their serfs' brains so that they all love slavery and can't psychologically function as free individuals.
In Poul Anderson's Dominic Flandry series, Flandry rescues an alien who becomes his slave. When a new tax (or some such) makes it inconvenient for Flandry to own a slave, Chives reluctantly accepts manumission but remains Flandry's valet.
Virtually all victims of the White Court vampires in The Dresden Files end up this way. Thomas and his girlfriend/primary food source Justine are the most prominent example, with the tragic twist that their love becomes physically harmful to Thomas.
And Butcher never lets it become very sexy, or when it starts to, he usually yanks aside the curtain and makes sure everybody gets to see the nasty underlying reality at a key moment (except for the above mention of Thomas and Justine, who fell in love as a result of Justine's addiction to being fed on).
Victims of the Red Court also tend to stick around vampires by choice. In the case of the Reds, it is because their saliva is a narcotic that is effective within moments of contact and also highly addictive.
Jim Butcher writes that way, even when magic is flying and vampires are loose and furies are being bound, reality is never very far away. See his treatment of the lovely Lara Raith at the end of Turn Coat, which is almost a slap in the face at the whole 'sexy vampire' trope. Jim Butcher often writes fantasy-come-true as a nightmare in disguise.
However, Bob the skull seems to be pretty happy being enslaved to Dresden. (Considering his previous masters have not only treated him worse, but that his master's personality automatically will warp Bob's own personality, so serving an evil master turns him into someone he really doesn't want to be.) And the Little Folk basically declare themselves Dresden's personal army and houskeepers after he frees them, refering to him as "Lord". (And even though he does pay them in pizza, he never bothers to make them aware how simple it would be for them to acquire the stuff themselves.) This is largely explained as fairies and abstract spirits being unable to think outside a system of feudal obedience, and having little to no concept of morality in the human sense in general. Still, it is interesting that Dresden also isn't squicked by this subservience, and will bribe Bob with temporary freedom or threaten him with the loss of entertainment privileges without any twinge of conscience.
Although in fairness to Dresden Bob's idea of a good time is to go out into the world, possess some people and manipulate them into a shameless orgy. So perhaps he's justified with keeping him on a tight leash. He also seems on friendly terms with Dresden and receives - or often demands - payment in return for helping out. Generally in the form of romance novels or mischief. Keeping in mind that his personality changes depending on the wizard who possesses him - and he has expressed dislike for the evil creature he can become under evil wizards - it's difficult to argue he's a slave in anything but the most technical sense.
In Duumvirate, good (as in competence, not as in morality) masters have their servants get to this state quickly.
Seons from Elantris are magical beings derived from the Shard Devotion, and serve their masters out of love. As a child, Raodan tried to free his Seon, but it refused.
In the Foundation series, The Mule (a mutant that can control minds) is capable of inducing this on any person he encounters, but he tends to do it on his most capable enemies, to be able to make use of their abilities without fearing their rebelling. When a member of the Second Foundation breaks The Mule's control over one of his generals, who comes from the First Foundation, he notes that the general is not happy with having being kept enslaved to The Mule's will.
In Sergey Lukyanenko's Genome, the planet Heraldica is home to the descendants of old Earth aristocracies. It's populated by the nobles and their servants, the latter of which have undergone the "Servant" specialization, which conditions them to serve their masters unquestioningly and love their role in life. Because of this last part, they also willingly have the same specialization performed on their children, convinced that their children will also love it (which is true, in a twisted way). When visiting the planet, the protagonist observes a hunting party on horseback chase down a servant girl, shoot her with a Stun Gun, and then gang-rape her. After that, she calmly gets up, and walks back to the village, apparently unperturbed by what just happened. Pretty much all specializations also include the "love your job" part of the mental conditioning, making this trope partly true for them as well.
All of Scarlett's house slaves come back to work for her after the war in Gone with the Wind (OK, so that's only four of more than a hundred - the cotton pickers chose a better life, poverty and hiding for the most part, instead). In fact, this is shown with many of the slaves owned by the white characters—one of whom is explicitly stated to have scorned the notion of his freedom. This attitude is no doubt helped by the fact that these people are all portrayed as "good" slave owners who would never dream of mistreating their slaves—no beatings, rapes, breaking up of families, hence the slaves preference to remain with them in comfort rather than the uncertainty of the outside world.
Played horribly straight with Gottfried in Gravity's Rainbow, who is so happy as a Nazi commander's sex slave that he volunteers to pilot the suicide rocket 00000 and crashes it into a full cinema, killing hundreds and, by extent, the reader as well.
Tedla, of Carolyn Ives Gilman's Halfway Human, recognizes itsnote Tedla is neuter enslavement as cruel and unjust, but is unsure that it wants to be free — the prospect of being responsible for its own self and decisions (something Tedla has never known) is very scary.
Joel Chandler Harris, the original author of the "Uncle Remus" stories, romanticized plantation life in the stories, with Remus portrayed as a stereotypical (for the time) "happy slave." But then, these were Harris' subjective memories of his own childhood, so Uncle Remus' characterization is forgivable. Besides, it's Brer Rabbit and the other animal characters that everyone remembers.
House Elves in the Harry Potter series, who appear to be a whole Slave Race that are like this. They are magically obligated to obey their masters in all things, even to the point of harming themselves. Some are well treated by their masters, others are horribly abused. Still it appears that the vast majority of elves find the idea of being freed distasteful (they compare it to being fired). Even Dobby, who loves his freedom, still wants to work and will only accept enough pay to prove that he's free. Nonetheless, even being magically bound to their master, they can still feel resentment towards their master if they are ill-treated. Because Sirius constantly insulted Kreacher, he creatively interpreted his "OUT!" command to get out of the house and eventually betrayed him.
Hermione does not take well at finding out Hogwarts employs unpaid house elves, and so starts a small organization, Society for the Promotion of Elfish Welfare, but it fails to get anywhere because the elves don't want to be involved. Her opinion is that they like slavery because they're uneducated and brainwashed, when the real answer appears to be because of their Blue and Orange Morality (i.e., they like working, it's being mistreated that they hate). She later has a talk with Dumbledore offscreen that establishes the straight facts, but she still advocates for house elves to be treated well in slavery, which is proven right when Kreacher betrays his master Sirius because he mistreated him.
While Jonathan Strange & Mr Norrell's Stephen Black is not a slave per se, he is a servant. When the gentleman with the thistle-down hair begins his plan to free him, Stephen isn't very happy at all.
You'd probably be very hard pressed to find a butler who's happy to have his life stolen away from him and replaced by a world populated by cruel and capricious Fae.
And yet by the end of the book he refers to his time in England as captivity and goes off to rule a nation of Faeries (they get better), of course the gentleman did have 10 years to influence him, and all the enchantments didn't help.
In summary, Stephen did not like being a servant, but did like his master and understandably considered the 'freedom' offered by the Gentleman worse.
Diana Wynne Jones uses this a lot in her books, so often it's notable when a main character isn't ignorantly letting him or herself be exploited by someone they care for deeply, whether it be by family, lovers or friends. However, these characters are generally not ecstatically happy before they notice they're being exploited and when they do they tend to break free.
Played with in The Homeward Bounders: Joris, one of the main characters, is a slave, an obsessed fan boy who cannot shut up about how awesome and God-like his master is, and is really concerned about behaving like a proper slave. He could model for this trope until he has a meltdown and reveals that he absolutely hates being a slave, not because anyone is mean to him but just because it sucks. And then he finds out his owners are just waiting 'til he's old enough to legally be freed. So it works out okay.
Deconstructed in Kindred by Octavia Butler: the plantation slaves find what happiness they can and even show some affection for their owner in his Pet the Dog moments, but are always crushingly aware of the horror of their circumstances and do what they must to survive from day to day. Even Sarah, the Mammy-esque cook, is carefully concealing bone-deep rage and pain at having had almost all of her children sold away from her.
Crops up in The Legacy Trilogy written by William H. Keith (under the pen name Ian Douglas). Humanity discovers a Lost Colony of the Ahn/Ah'nu who were once Ancient Astronauts and who still have a population of human slaves. The humans are all rather docile and react badly when test groups are brought back to Earth and given independence. Turns out there have been several thousand years of selective breeding going on since all the slaves with the intelligence and independence to escape have done so and live on their own colonies away from the very centralized Ahn.
The Lord of the Rings: Wormtongue becames Type II to Saruman in Return of the King, after Gandalf removes Saruman from the Order. That is, until he snaps.
Udinaas in the Malazan Book of the Fallen is an example of the fourth kind. Being a slave among the Tiste Edur means he has food, shelter, mostly fair treatment and also the company of other people from his home country among the other slaves. Being free would mean having none of these things, as due to his home country's system of hereditary debt he's in so far he'd have to sell himself into slavery with far worse conditions just to pay off a sliver of his father's or grandfather's debt, probably on a trader galley, too, again, and he hates the sea with a passion.
According to Victor Hugo in his novel The Man Who Laughs, the British fit this trope for accepting to be ruled by a king again after the death of Cromwell. (Hugo's real targets are the French, for refusing to fight to preserve the Second Republic and accepting the rule of Napoleon III. He really hated Napoleon III.)
Nightfall Series: Prince Vladimir claims the Farm humans are happy to be slaves and to be bred as blood supply for the vampires. Myra refuses to believe it.
Arguably justified with the alien Tasch-Ter-Man in the German SF series Perry Rhodan. They're naturally eager to take orders from others because having to make their own decisions uses up some of their limited lifetime supply of a particular hormone and running out of it kills them.
In Alastair Reynolds' The Prefect, some of the Demarchist space colonies in the Glitter Belt are "Voluntary Tyrannies," where the citizens freely give up many rights and freedoms for protection and guidance. The inhabitants feel freer when they don't have to think for themselves. Perhaps justified, in that these arrangements are indeed voluntary; they were founded by a small minority of people who think this way, and people who disagree are supposed to be free to leave. Subverted, in that the only one we actually see much of has Gone Horribly Wrong, which is a persistent problem with the Tyrannies. The people in this particular habitat aren't so happy any more, but can't escape.
In The Queen's Thief book, Kamet—who belongs to previous antagonist Nahuseresh—is covertly informed by the Attolian embassy that they plan to free him by taking him back to their country, if he chooses. Kamet has to restrain his laughter, because he's the personal secretary to the brother of the Medean Emperor's heir, wields authority in the household (even over free men), and is looking forward to being a man of influence as right hand when the heir takes the throne. When he's forced to flee with them, however, he re-evaluates the issue while traveling with the Attolian soldier Costis.
In Steven Saylor's Roma Sub Rosa series, main character Gordianus has an Egyptian slave named Bethesda who is more than happy to serve as his mistress until he decides to free her and marry her.
An interesting case in Sergey Lukyanenko's Rough Draft duology. The world of Antik (AKA Earth 4) has been artificially stalled in developed at the Classical Age. The institution of slavery is still present there, but with a twist. A slave is allowed to own property, but that property is his own, not his masters. This means that it's not uncommon for a slave to be wealthier than his master. In fact, the only thing a slave is not allowed to own is slaves of his own, but he can have wives, concubines, and servants (and no, they're not necessarily slaves to his master). Additionally, twice a year, all slaves are given out weapons and are allowed to rebel. Should they win, they swap places with their masters.
"Shoggoths in Bloom", a Lovecraft Lite novelette by Elizabeth Bear. In 1938 an African-American college professor investigates the shoggoth populating reefs off the coasts of Maine. Rather than suffering a horrible death, the shoggoth contact the professor telepathically — after the decline of the Old Ones they find themselves without a master, and so offer their service to him. This puts the professor in a quandary — the shoggoth would make the perfect weapon against the rising tide of fascism in Europe, but is he morally right to enslave them again? In the end he tells the shoggoth they must learn to be free, and leaves to France to enlist in the army.
Somewhither: Many (though by no means all) of the slaves of the Dark Tower have this sort of mentality. Pally, a slave that the protagonist talks to at length, is shocked that someone might object to having their world conquered by the Dark Tower, since it's obviously so much better to live under its rule.
Daenerys abolishes slavery in the cities she'd conquered, and is shocked to find many of the ex-slaves trying to sell themselves back to the trader ships for sale elsewhere. It's explained that most of them are skilled or educated and would be treated well, while the city is now full of starving people and at risk of becoming a Wretched Hive. The Unsullied also have difficulty with the idea of not serving anyone and keep working for her, although they do appreciate the benefits of semi-freedom. Like being allowed to have their own names. Many of the pit-fighters also point out that now they're free their living standards are much worse then when they were slaves.
Penny, a dwarf girl who fears 'big people' - and not without reason, seems more content when she and Tyrion are (well-treated) slaves than when she had to fend for herself. She is very reluctant to escape when Tyrion orchestrates an opportunity while their master is dying, and eventually he resorts to simply ordering her about, promising that if they both survive he'll sell her again to a kind master if she wants. Tyrion, for his part, reflects that the life of a slave is little different to that of one of his former servants.
Wildling "marriage" has shades of this. Wildling men "steal" their blushing brides from wherever they were living before (typically their parents' household or home village), but at least one wildling woman puts this forward as a good thing, because only a man bold and clever enough to do so would be worthy of her. When a southland "kneeler" points out that such a man might turn out to be abusive, she says that if that turned out to be the case, she'd simply stab him in his sleep. Beyond the Wall, she says, mothers teach their daughters that a man can have an unhappy wife, or a knife, but not both.
In Michael Flynn's Spiral Arm novel On The Razor's Edge, Podiin is told by Gidula that he will free him, and Podiin begs and grovels to stay. He is mentally retarded and can cope with orders or with a very structured environment.
In the Star Trek: Mirror Universe novellas, Mirror!Janeway and Mirror!Christine Vale are both loyal to the Klingon-Cardassian Alliance. Vale even gets a speech about how the savagery of the Terran Empire is evidence her people shouldn't be allowed freedom, apparently not noticing that the Alliance is hardly an improvement.
Mord-Sith to any Lord Rahl, from the Sword of Truth series, due to brutal brainwashing from a young age, which includes being forced to kill their fathers. They still stick around even after Richard freed them (deciding that someone who would do that is worth following), and some were happier than most after he gave them more... freedom. Also, those touched by a Confessor-they literally have no desire except to serve them, for the rest of their lives.
In The Tamuli by David Eddings, an entire race (the Atans) is enslaved. It's described as standardized and really mostly inconsequential slavery—the Atans are the Tamul infantry, and they're pretty damn good at it. The explanation for the slavery: the Atans kept trying to kill each other, and about the only time the Tamuls ever exercise their "mastery" of the Atans is to order them to stop fighting amongst themselves. And the Atans? They like it that way, seeing as how they're a Proud Warrior Race. Seeing as the Atans consider themselves honour-bound to kill anyone who insults them by, among other things, letting his shadow touch them, their self-imposed slavery might just be the only thing keeping the Atans from exterminating either themselves or every other race, whichever happened first.
Most of the dragons in the Temeraire series, especially in Europe. Even after Temeraire visits China, realizes there's another way to live besides being under the control of humans, and becomes intent upon crusading for dragon-lib he still adores his position and his captain.
A more extreme example could be found in Levitas. Rather than being cared for like many of his comrade dragons, he's neglected and abused by Captain Rankin but still remains lovingly loyal. His death is the biggest Tear Jerker of the first book and Temeraire later brings it up in support of his ideas.
In Poul Anderson's "Time Lag", Elva convinces Bors that she's this — he's willing to take her back to her native planet, where her husband died in an attack he ordered.
The capped in The Tripods series because they are under mind control. When that breaks down they are less happy...
Harry Turtledove wrote a short story about a primitive alien society that oppressed one tribe for some ancient crime committed by one member, binding them with many arbitrary rules. But when humans arrive and attempt to free them, the tribe's members refuse. It turns out having to keep all those complicated rules selects for greater intelligence; the tribe is smarter than humans and content with its lot, given the consequences.
Sam in Uncle Tom's Cabin. Note that, despite the modern use of his name, Uncle Tom does not fit this tropenote The rise of "Uncle Tom" as a derogatory term stems from the Minstrel Show parodies of the book, which used it as an excuse to indulge in stereotypes of black people. — he's a faithful servant and can find happiness in the worst of places, but his dearest hope is to be free one day.
Deconstructed by the narration and Mrs. Shelby's musings. Sure, the current master my be kind, but the whims of fate can see a slave given to a complete scumbag, and what good did being well treated do them? The character George, for example, accdentally upstages his (up until then bearable) master by inventing a cotton gin and is then after mistreated until he legs it to Canada.
In Vampire Academy, the dhampirs sacrifice their lives and livelihood for the sake of protecting Moroi, and few give any of it a second thought. Non-angsty dhampirs are refreshing, but this one's a bit on the other extreme.
The Aiel might not enjoy it, but their honour system demands that they serve for a year and a day as "gai'shain" to their captors. Refusing to accept their role would be a dishonor that would require further service — just as it would be for an Aiel to keep a gai'shain past their allotted time.
Damane, channelers who are leashed by the a'dam, are also often like this. The Seanchan treat them like dogs, and believe that it's a just and necessary thing for the good of the world. The vast majority of damane believe it, too... thanks to a lifetime of ruthless conditioning to break down their sense of self. Even damane from non-Seanchan lands come to feel that way, although one who escaped is absolutely horrified by how close she came to internalizing what they were telling her.
The Seanchan also keep many non-damane slaves. Some are chattel, but there are also slaves who serve in honored positions (somewhat like the real-life Roman examples below). It is possible for a slave belonging to the royal family to give a free nobleman orders. Naturally, this type of highly-privileged slavery produces some fairly contented slaves, although there are also some who prefer freedom.
In the Indian novel The White Tiger: The whole 'Rooster Coop' analogy explains the phenomenon of how 80% of Indians are in a way servants who simply cannot not obey their masters (the other 20%).