I don't think its reasonable to assume that a company could ever have full safeguards in place to ensure that a bad actor employee could never cause meaningful damage, unless you are okay with a completely trustless system. Companies must trust their employees at some level, generally the level of trust grows in relation to the employee's responsibilities.
Its unreasonable to assume that any system can be 100% foolproof, if that's a requirement it just shouldn't exist. In the case of companies, they have to accept dome level of risk that employees can cause damage, whether intentional or not.
Hard disagree. People should be trusted with the things they need to perform their role, and no more than that. You would not give access of a production database to a CTO just because they have more responsibilities than a sysadmin, and any CTO that tries to bludgeon their way into getting access to it should be considered unfit for work.
Say I'm a software developer specifically working on the frontend library for an authentication service. The company needs to trust me with access to parts of the system and infrastructure pertinent to that feature. I very much agree that I should be locked out of other areas that I don't need for the job, for example I shouldn't have access to employee records, accounting, etc.
Once I am fired, though, the company has to continue to trust me to not misuse the parts of the system that I do already have access to. If I am fired but allowed to stay for a transition period and my permissions aren't revoked immediately, the company is trusting me. If I am fired and immediately blocked, its a sign that the company didn't trust me rather than an indication of my own mistrust for the company/institution.
My point was never that there aren't security protocols that could be used, only that its not relevant whether the employee trusts the company in that scenario.
With the proper protocols in place, a company doing layoffs signals "we trust you can still perform your role as a developer, you can still communicate/collaborate with your colleagues and you can even access the source code (because who really is going to check if you are deleting the code repo from your machine?), and the removal of write-access to the systems can be seen as a smoke test if the transition can be done orderly", while the standard current procedure just says "Through no fault of your own, you will be seen now as a potential threat so we will treat you as toxic material".
Or they could, like, take responsibility for their actions that led them to that point?
Companies don't have agency or feelings. If company leaders expect people to do their jobs properly only because they are getting paid, it's already an institutional failure, because it's not taking into account that individuals are fallible.
If the company does not have an established process to protect itself from human error, whether accidental or intentional (like an disgruntled employee going rogue), when shit hits the fan all its leaders can do is to find blame in the individual. But instead of blaming people and hoping that we can force everyone to avoid mistakes, a better alternative would be to design a system that can withstand human nature and fix the institutional process so that that error doesn't happen again. The problem is that to do this takes time and most company CEOs can not see much beyond the next fiscal year.