Could be part of an escrow contract - e.g. if the company goes out of business, after x years, the escrow agent will release the code into the public domain.
I've been through this a few times as both the vendor and the client. There are normally a bunch of conditions that can trigger a release of the the source code to the client. These _could_ include business failure but also non-performance or acquisition.
I've never come across one where escrow agent will release source to the Public Domain but I guess it could happen.
Companies like Iron Mountain have escrow services for clients of SaaS providers. I think in these cases data escrow is significantly more important than source code escrow.
If a failed startup releases their source code and another team picks it up and solves whatever problem the original team had - time, resources, bugs, etc. and is successful, then there would be some kind of kickbaack (albeit small) to the original owners or developers.
I've never come across one where escrow agent will release source to the Public Domain but I guess it could happen.
Companies like Iron Mountain have escrow services for clients of SaaS providers. I think in these cases data escrow is significantly more important than source code escrow.