Or, you know, have backups and backups?
It's not like these games were released two decades ago. It's also not like the company who owned the rights to these games didn't get bought out. It's also not like tape drives get lost. It's again not like cloud backups have been commercially viable for small companies in only the past 10 years. /s
Backups don't solve all the issues. In all likelihood, the source code was stored on a CD or Tape drive. In the case of a CD, they degrade over time. In both cases, with the property change from the now not-the-same developer or publishers, and the changing office locations and the bankruptcies that may have happened, losing the original source code is trivially easy. In fact, I'm more surprised Beamdog was able to get their hands on the original source code for as many games as they have.
Losing source code is extremely common. This goes doubly true for things that were produced in the time before cloud backups were commercially available. You can shame and blame them all you want, but how many files have you lost before the year 2010? How many CDs that have installer information, music mix tracks, work projects, are lying around that you have simply misplaced? Have you changed your residency before? How much of the stuff when you moved seemingly disappeared even though you could swear you packed it?
Don't hold yourself to be the highest paragon of data preservation. You make mistakes, companies do too. You can't just blame a single front-end company for a mistake that was likely not even theirs to begin with.