Having seen people come and go from companies, and also having been in the situation myself a number of times, I am curious as to what the reasons behind letting the team know that a person is leaving early versus the opposite extreme which is letting them know on the day that the person is leaving.
I assume that apart from the person who is coming in or taking over the role, there is no specific need for people to know (since they are not involved in the handover), but from the team's perspective they may like to know that the HR or manager keeps them in the loop about these things.
Drawing a similar analogy from sporting teams where they can transfer players during the middle of the season, it certainly has a lot of impact in terms of team stability and morale.
My question is, what is the benefit of leaving this information until the very last day, and would it be better to let people know earlier rather than later?