Howling:When the actor who plays The Doctor is leaving, why doesn't anybody keep it a secret so thatthe regeneration is a suprise?

Why is it when an actor is leaving the role of the doctor, they tell everybody. Why can't they and the other people involved in the show not tell anyone and let it be a surprise when the regeneration actually happens. I remember watching the ninth doctors regeneration and being as completely shocker as rose was in that scene. I am binging up this point as I knew that both david tenant AND now matt smith were leaving the roles months before it actually happened.