If you work for Microsoft (for example) pretty much EVERY tech company is a competitor of theirs because they have soooo many products and services.
I saw this happen multiple times. You tell them you're leaving, and get escorted out by security. It's just not worth the risk for them.
Right, but did they cut off paychecks too?
Being walked out of the office is equivalent to having your access removed like I said above. It doesn't mean the person is fired, it just means they don't have access to sensitive information.
In practice, it's not really a big deal. If someone is going from a high-paid FAANG job to another high-paid FAANG job, the new company is usually eager to have you onboard. They can move your start date up. New compensation might be higher, too, so it's a net win.
I've seen it happen multiple times. Microsoft has a list of competitors that if you say you are going to work for them, your access to everything is immediately revoked.
Managers at MS ask their employees to NOT SAY where they are going, so a proper off-boarding can take place.
The only exceptions I can think of were when people gave multiple months of notice that they were going to quit and already had declining performance due to e.g. unhappiness about the job. If you're not performing well and you tell your employer that you're quitting in a few months, they're not really interested in giving you more paychecks to perform poorly. IMO, that's not exactly unreasonable either.
Some companies will restrict the employee's access for the notice period and remove their work as a way of protecting company information from last-minute exfiltration (it happens a lot more than you'd think), but those employees are still paid during this time period. They're also obligated to answer questions and attend meetings about handoff, although in some cases this may amount to zero work.
But no, it's not common for US tech companies to fire employees immediately for resigning. I don't know where the parent commenter got the idea that this is common.