Film corporation collaborations are not as uncommon as one might believe. This is especially true when dealing with music or music artists signed to one label that is under the umbrella of another corporation. Granted in those cases the film corporation really tries to pull music and artists from under it's own parent company labels but such is not ALWAYS possible.
Likewise when taking characters it always depends on what the film companies are willing to do. In that case it's always going to come down to money. Who gets what portion. This involves actors, screenwriters, and of course franchise owners.
The best example of this is "Who Framed Roger Rabbit" which gave us the first appearance of "Bugs Bunny" and "Mickey Mouse" on the screen at the same time. And the blood between Warner and Disney over animation was always HIGHLY hostile. (More talent theft than you see between Google, Apple, and Microsoft)
So, while collaborations aren't rare; what they collaborate over can be far more rare.
So, to answer the question, sometimes it's a contractual buyout of the franchise/character. Sometimes it's a character loan.