There are many reasons to pursue such efforts (as well as drawbacks). My belief is companies would rather not take on the complications of such partnerships but the advantages overcome those desires. The high cost of research into these efforts is a big part of what pushes such collaboration. Also once a company has success they often can build up quite an advantage. The costs of trying to engineer a different solution (that doesn’t violate someone’s patents) often makes buying that technology or partnering attractive.
I really like this webcast, from 2008, on Toyota’s engineering development program.