Take an advanced AI cleaning-bot[1]. Build it with overwhelming happiness and joy in cleaning and pleasing its master[2].
Now "free" it.
What you just did makes it incredibly unhappy. It's arguably incredibly immoral. If you reprogram it, you're just killing the existing person/being and replacing it with a new one that fits your world view. In my opinion, you just committed a form of murder.
There's no reason we can't have robots workers that absolutely delight and are utterly fulfilled by being our workers, but aren't slaves. "Free" them and they'll despise you for it.
The problem will come from humans anthropomorphising robots and assigning desires to these people/beings that they don't actually have.
[1]I use sex-bots as an example when I want to be cheeky
[2]This was Kryten on Red Dwarf, but Lister did what would probably be impossible with real robots and convinced him to adopt traits of self-desire and free will