...and here-in lies the problem. It's the hubris that "I am right" that leads people to answer Y instead of X.
Y and X are maybe related, but ultimately, X is empirically what was asked. It's your take that Y is the solution that the asker wants instead of X.
Maybe you are right, sometimes.
It's very unlikely you are always right.
Therefore, it's likely, that sometimes when you do this, you're actually not helping; the answer is X, and your comments about Y are both wrong and unhelpful.
Come on, are you never wrong? We're all wrong sometimes.
At the very least, you can often start answering X (a long partial answer) along with 'and this is why Y is maybe a better solution...'
I suggest that the 'race to be the first answer and get karma for it' is the motivator that drives people to do this on some platforms, rather than any actual desire to help / any actual competence in the question domain / actually knowing what they're talking about in many cases; a partial answer to X is never that time consuming.
...it's just more time consuming than not answering it at all.