Usually when you resign, there's an "effective MM/DD/YYYY" clause in your resignation letter. Until that date, you're still an employee, and still bound by any contractual obligations as such.
There's no particular reason for that effective date to be "now" vs. "two weeks from now". I've certainly had coworkers that announced their intention to resign 2 weeks or a month before their actual departure (actually, the one time I've quit a job, I think I stayed for a couple weeks afterwards wrapping up my project & transferring knowledge). The difference is only that in one case, the employee is intending to resign but you don't know about it, but in the other, the employee is intending to resign but you do know about it.
If you've read the news reports, this was an immediate resignation. At least in California, there's no obligation to give notice on a resignation. It's a courtesy, but in the case of some senior positions, or when you're going to a competitor, a company isn't going to want you to work two more weeks anyway.
Right, but now we've circled back to the original point, which is that when you do give notice, it makes no sense for the company to insist that you leave immediately and escort you out, as you were in control of when you gave notice. If you wanted to do any damage, you would've just done it and then gave notice.
So what, you just let them hang around the office for while? Maybe poach a few employees? It might not prevent any damage that's already occurred, but there's no reason to allow more damage.
Work out an end-date with them that will allow for a comfortable transition & knowledge transfer. Perhaps that's "immediately" if someone else can take over their job, or if they're not interested in staying and helping you. Perhaps it's "2 weeks from now." But generally assume good faith, because if they wanted to screw you, they would've already done so.
There's no particular reason for that effective date to be "now" vs. "two weeks from now". I've certainly had coworkers that announced their intention to resign 2 weeks or a month before their actual departure (actually, the one time I've quit a job, I think I stayed for a couple weeks afterwards wrapping up my project & transferring knowledge). The difference is only that in one case, the employee is intending to resign but you don't know about it, but in the other, the employee is intending to resign but you do know about it.