You're conflating notice and severance. It might be desirable to give enough notice so people can do more work, but it might not. I actually think it's more dignified to let people off the hook immediately. When you lay them off/fire them, you've typically failed in some way as a company, and expecting people to fulfill some responsibility knowing their time's up is pretty harsh.
In "sane countries" you can have people stop working immediately as long as you pay them. That's really all the notice period is for, it has nothing to do with continued responsibilities.
Tech company severance packages are usually pretty ok, I would bet stack overflow is giving packages that would be just fine in other countries.