Just something about knowing a person is an amazing and knowledgeable resource and he’s choosing to work here of all places is a subtle morale boost. When they decide to leave, others might start asking “well if that guy left, am I still making the right decision to stay?”
I’m sure we’ve all experienced someone important leaving our company and having a waterfall of turnover that follows it. That is very disruptive and more should have been done to keep that one employee or at least keep the rest that followed them out the door.
Moving on is a fact of life, more so now that ever. My parents both worked for the same company over 35-40 years before they retired; I don't think I can imagine that'll be even close to the norm for many in the workforce now (especially software / other tech).
I can't speak for programming but in soccer this is well-known. It's just very hard to Value just like an employer would in terms of having that person on board for morale. Fortunately the better people get it and understand that that person should be value even if they weren't directly involved in making the change but they were definitely a part of it.
This is what plagues me with most corporate companies in the United States. It should be about teamwork not about what this person did or I did, rather what the team did.
Sure you can value people individually, but teams trump individuals all day long in the long run.