Let me elaborate a little.
My dreams are none of an interviewer's bloody business. I'm here to work not share the things that give me hope in my darkest moments or the aspirations that shaped my adulthood. I find this question very creepy and extremely unprofessional.
I could maybe figure out a "lesser dream" to share, but then what's the point of this question? To find out the most intimate thing that I'd be willing to share?
Where I see myself in ten years is a meaningless question to ask after I've had, what, fifteen minutes of exposure to a company's culture? Maybe I'm the kind of person who sees themselves in management over ten years, but you've got such an amazing working culture that you could convince the most ambitious career builder to stick to engineering instead. Or vice-versa. Or do you really want to hire the kind of people who get an idea in their head, and then do it, even if it takes them ten years and it's really, really, really bad idea?
I've heard all sorts of ways to justify these things. That it's a way to see if a candidate can relate to you and evaluate their empathy -- if anything, this will say more about an interviewer's biases than about anything else. To see if a candidate can communicate about abstract matters -- as if there are not countless questions about ethics, aesthetics and epistemology in our profession that you need to start prying into personal things. That it's a way to see if they're "career-oriented", whatever that means, as if someone who writes amazing code but wouldn't hustle for a promotion is a bad hire.
So far, it hasn't turned out to be a bad idea.