The XY Problem
The XY Problem (or X-Y Problem) often comes up in software development or customer support, where someone asks for help to achieve a solution (X) that they have chosen as a way to solve a different problem (Y). Helping with their solution may not help them solve their actual problem if it's not a good approach in the first place.
An example from software development is a person asking how to extract the last three characters of a filename (solution X), because they want to know the file type (problem Y). After helping them do solution X, it still wouldn't solve problem Y as some files have extensions of more than three characters.
Another example is a customer asking for help accessing their online account without realising that what they really want to do has to be done over the phone anyway.
There's art and skill in respectfully answering questions and helping with what's asked while seeking to understand the real goal. And if you're asking questions, providing more context may help others provide better answers.
In development, it saves time and effort. In customer support, it leads to happy customers. In design, it may be uncovering unmet needs.
The name is indirectly from Eric Raymond in How to Ask Questions the Smart Way :
"Q: How can I use X to do Y?
A: If what you want is to do Y, you should ask that question without pre-supposing the use of a method that may not be appropriate. Questions of this form often indicate a person who is not merely ignorant about X, but confused about what problem Y they are solving and too fixated on the details of their particular situation."
Also see a better hierarchy of needs, the metrics onion, challenge and clarification questions, prefer open-ended questions, ask the question at talks, don't fill the silence.