There are many closed source applications that have been removed from the Google Play catalog for various reasons.
Often this reason is the cessation of further development and maintenance of the application.
Why don’t these people make the code open to everyone if they don’t need it anymore?
This could bring great benefits to all people, but everything that was once created simply disappears.
Because it’s probably a mess of code copied from multiple dubious sources that would potentially cause legal trouble it it became public.
Also if there are multiple developers, often including outsourced code or framework code that is licensed under certain conditions, it can be very difficult to get the full rights needed for a relicense. And you don’t gain anything, you just risk that people find bugs or other problems with your code and sue you or make fun of you or whatever.
Also, many internal code contains private information in the comments, like internal memos, names of employees, internal jokes, and so on, and cleaning that up before a release would take a lot of time.