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.