You're devoting the next 5+ years of your life to a single task. You're forgoing your programmer salary for the next 5+ years, which could easily add up to $300k - $500k in opportunity cost. Your forcing your wife and kids to come along for the ride. You're going to end up a world expert in a tiny niche that, quite possibly, nobody outside of academia cares about. You should have a pretty good idea where you want this all to lead.
There are practical reasons for having a goal in mind:
* If you want to land an academic job, you should be planning for that from day one. Academic positions are extremely competitive, and you need to make yourself an extremely competitive candidate. That means you must present and publish your work aggressively often, networking extensively, and choose a popular topic of research that will garner you many citations, etc.
* You have to make many important decisions right from the start of grad school (who to choose as an advisor, what topic to research, etc.). Choosing poorly will have ramifications for many years to come. Having relevant criteria (such as some long-term goal) can help you with these decisions.
* It's not entirely unusual for candidates to languish for 7+ years in their program, often due to lack of direction or because they expected their advisor to motivate them and keep them on track. You need to motivate yourself. Having some direction from the start can help with this motivation, and also help you from getting swallowed up by all the time-sinks that will eat away at your productivity.