Mostly already been said, but I figure it’s a manager’s job to know what an employee is looking for, know what their frustrations are and what they value. It’s not always possible but I figure it should never come as a surprise when an employee leaves because you should know what market pay and benefits are out there, what opportunity for growth there is within your company, etc. if you are looking for someone to be competent and punch a clock in the same position for many years, then both parties had best be on the same sheet of music on that and what it takes to stay there, or you’ll have more turnover than you want. Same with an employee who wants to grow and move up the ladder—you can either build a path within the company or not, but if not you know at some point relatively soon they will get the experience they need and then move on if there isn't a “next move” for them there. If you have the conversation ahead of time (every review?) then it shouldn't come as a surprise to anyone, and it keeps you up to date on risks to your department and the company and where you have opportunity to make changes that have the potential to improve the long term function of your team.
Also, if you choose not to make changes that might be required to keep an employee, I dont look at a good employee leaving as a bad thing necessarily. Assuming the new employee is reliable and at least engaged, assessing what your real needs are and what you are looking for allows you to hopefully find someone who is a better fit, getting fresh perspective on any team is still a benefit, it keeps you and the team from getting in a rut, makes sure your processes and organization are sound, etc. No one likes to have to hire, especially when its hard to find good people, but it really is an opportunity that can be a benefit to the company and the team.
edit: Also to a degree it's dangerous for people to stay at one company for too long becasue many employers consider too long at one company to be a negative, they would rather see some breadth of experience, i.e. several years each with multiple different companies.