Because any more time the person remains there is giving information to a potential competitor (and there's no point staying if you don't want to be there anymore)
I think Marissa Meyer gave Google a half hour notice.
He probably gave notice and this just was developed privately until his time had come. It's wise to do this kind of thing in the background. Subordinates are more likely to question the decisions of someone that they know won't be around much longer, etc.