I have worked at a company that had the policy that any time an employee gave notice that they were leaving, the employee immediately had their access credentials revoked and was walked out of the building by security. The justification for this policy was that the employee might decide to sabotage systems if they were leaving.
While I think it is unnecessary in nearly all cases, I can at least understand the reasoning for a policy of immediately cutting access and walking an employee out after that employee has been informed that they are being fired or laid off. But there is NO sense in having the policy for employees who are choosing to leave. The policy of walking employees out immediately was well known. If such an employee HAD wanted to sabotage systems or plant a back-door, they would have done so after deciding to leave but before informing their managers. The policy served no rational purpose.
Imagine being a Google cloud customer and hearing that they need to give employees no notice of a firing in order to protect your data. Like that implies employees have unrestricted access!
If the answer to both of them is nothing then you've got a problem.
---
Well, first your question has a frame-challenge problem. Most SWEs are like a factory creating tools that an end user can then use/consume. You don't want to be in a situation where if there's a power outage in the factory then all of your smart lights stop working. The amount of people that would need sudo to customer-related machines is extremely low and so trivially they wouldn't need to be fired with no notice.
Sticking with the frame-challenge problem. There are many non-sudo activities that an employee can do. Literally their sudo access could be revoked no-notice and then they're given time to do knowledge transfers / pass off their on-call rotations / etc. For most of these layoffs the individuals are still employees for the next 60 days (WARN Act has a 60d notice period, this is why all the severances are worded so weirdly in that the employees get 60d of pay and then a lump sum of X. The lump sum is severance, the 60d is salary by-law -- they can't be fired yet).
The `sudo` command itself posses a problem for separation of duties but an invocation of it could be blocked without a review from multiple other people (perhaps that list is filtered by not-to-be-fired employees). It could also be that the command is set by one person (i.e. copy data) and the parameters are set by another person (i.e. machine1, machine2) and this can be done ahead of time (i.e. a template workflow).
So my not wanting to leave my home is not exactly agoraphobia.