Lots of websites—including many who should know better—mistakenly attribute this quote to Lewis Carroll.
This quote doesn’t actually appear anywhere in Carroll’s Alice books, and there is no evidence that Carroll ever said it. The closest approximation is:
‘Would you tell me, please, which way I ought to go from here?’ [asked Alice.]
‘That depends a good deal on where you want to get to,’ said the [Chesire] Cat.
‘I don’t much care where—’ said Alice.
‘Then it doesn’t matter which way you go,’ said the Cat.
‘—so long as I get somewhere,’ Alice added as an explanation.
‘Oh, you’re sure to do that,’ said the Cat, ‘if you only walk long enough.’
The minor sin here is sloppy sourcing.
The mid-sized mistake is sloppy thinking. Strategy requires rigorous thinking. And trying to get that thinking started with a lazily-misattributed cliche is not likely to be productive.
But I think the big screw-up is using Lewis Carroll to admonish people to have a clear goal, or to stick to specific path. Perhaps more than any other writer in the English language, Carroll celebrates the pleasures of aimlessness.
Even worse, he was a mathematics professor with a life-long inability to focus on studying mathematics. If Carroll had taken this advice, he would never have spent time inventing the Alice stories, wouldn’t have bothered to write them down, and would be unknown today. His success is a testament to the benefits of not sticking to a plan.