Because the company is usually offering some sort of severance, which will be withheld if you say "Yeah, no".
They're not saying, "you're laid off, effective today, but you have to stay for another two months", they're saying "you're laid off in two months, and your job duties are now to train your replacement". Saying "no" means resigning.