I have been involved in some very strange "forks."
Here's an example:
Company A owns company B and C. We created a product on contract for B. Company A sells the company B and all its assets to company D, a totally unrelated company. We continue to do development for company B-D. About a year later, it surfaces that company A sold a non-exclusive license for our product only (meaning no other products), including source and everything but the name, to company C. Company D hadn't cared at the time.
Company C comes to us to do maintenance. Naturally, we're apprehensive, even though they've got all their legal ducks in a row. Then company B-D cancels our contract, and suddenly company C's contract looks great. Sure, it's an old version of our code, but we know that code. All those developers that needed to be laid off or transferred to different projects… there's something for them to work on now!
Then company B-D comes back and wants a new contract. So we take that contract, being careful to introduce enough elbows that there's no one in common to either project.
So now we're working on both products, known to both companies. The companies, both in small and large forms (B vs C, and B-D vs C-A) growl at each other but each inspect what we're doing and are satisfied we've got enough separation. And we did. I was the expert on the original product and after all this settled I was working on the B-D contract. I would nod to the C people in the lunch room or we'd talk weekend plans, but there was no discussion of code.
Eventually, C didn't want any more changes. And five years later, neither did B. Nobody got sued, and in the end it didn't really matter.