How should a professor feel peace of mind when a student leaves academia? I apologize if this is the wrong forum for this question -- if so, could somebody please point me to the correct one?
I'm a professor who recently started advising graduate students, and I'm trying to find a way to feel good about the time I spend on my students when they leave academia.  I devote loads of time and energy into helping my students reach their full potential, and giving them every benefit of my experience, in part because this will contribute to the development of mathematics.  But I'm having trouble coming up with a justification for putting so much effort into mentoring students, if the students will wind up leaving academia.  Probably many people on this forum have thought through this and come up with some kind of answer, and I would love to hear about these.
Let me clarify that I understand that advising grad students is part of my job.  But there are only so many hours in the day, so I need to find a balance between time spent mentoring students and time spent doing research, writing papers, etc.  So far I've made my students my top priority, but then when they leave academia, I have a hard time justifying to myself that I should have sacrificed effort on all other fronts in order to help the student develop.
 A: How you feel about this will depend on who you are, maybe also on who the student is, and also other circumstances. What are the student's reasons for leaving academia?
If the student leaves academia because his thesis does not seem to be good enough to get him the kind of academic job that he wants, I could imagine feeling a couple of other things than "I shouldn't have put in so much effort". I might even feel that I should have put in even more effort; I might feel that the student has let me down and should have put in more effort; I might feel that in hindsight I shouldn't have agreed to work with that particular student and resolve to be choosier in the future but give it my all when I have chosen; I might feel relieved that the student is not embarking on a very hard road with little chance of satisfaction. 
If a student who had done good work then surprised me by seeming to reject the academic life and its values in favor of making big bucks on Wall Street, I might feel a bit resentful and taken advantage of, but I think I would not really feel that I had wasted my time: the student has put in more time and effort than I have, and really who am I to tell him where to go from here?
How would you feel if a student told you right up front that she wanted to study for a PhD under your guidance and then go into business or industry? Would you try to change her mind? Would you decline to take her on as a student?
EDIT Maybe you should consider cutting down on how much of your time you allot to this part of your job anyway -- not because sometimes your students leave academia, but partly because you have other kinds of work to do, too, and partly because the student ought to have primary responsibility for the success of his or her graduate studies.
