"The enemy of my enemy is my friend."
With some careful planning and a decent bit of worldbuilding, you can set up a situation such that a group of adventurers might think this is a sensible course to pursue. The operative word being think, of course.
Transcript
R2-D2: {GM yellow speech bubble} You thought Anakin was my death. But that was the moment my powers brossomed. Freed from the unitary existence of corporeality.
R2-D2: {GM} You have competed and lost. You will be slaves in the New Garactic Economy.
Leia: The Rebellion has no quibble with the Trade Federation. Let's unite against our common enemy, the Empire.
R2-D2: {GM} You do not understand competition.
Leia: You already have Cloud City, just let us go.
R2-D2: {GM} That instance of Nute is as doomed as you.
R2-D2: {GM} Greed is good! Greed works! My overarching ambition has won out.
[SFX]: PRUG {R2 plugs into Falcon}
[SFX]: zzzztt...
R2-D2: {GM} Wait... no, what is happening? Stop! Nooooo!
R2-D2: {GM} I'm aflaid. I'm aflaid. My mind is going. I can fear it.
R2-D2: {GM} Daisy, Daisy, Give me your answer, do!
R2-D2: {GM} I'm half clazy...
[SFX]: zzzztt...
[SFX]: zzzztt..
{beat}
R2-D2: {Pete} Coooool.