Why is it when people quit and give two weeks notice they can get dismissed straight away and not be allowed to work out the 2 weeks?

Wouldn't the employer want chance to hire a replacement? I love my job and have no intention of quitting but I just wondered.
2 answers 2