Legally it varies
In "Employment-At-Will" states, the two weeks notice is a politeness that usually just gets you two more weeks of pay/benefits regardless of whether or not they actually allow you back into the office. Most companies use that time to try and get you to write down everything you do so they can try and train your replacement. But very few companies will refuse to pay those last two weeks - even in "Employment-At-Will" states courts typically side with the employee when a company tries not to pay them for those two weeks. If they are that against you, the question the judge will raise is: "Then why didn't you fire the individual?"