Your sample sentence is 'valid' as an elliptical construction, answer ellipsis in particular.
First, a note about ellipsis:
In linguistics, ellipsis (from the Greek: ἔλλειψις, élleipsis, "omission") or elliptical construction refers to the omission from a clause of one or more words that are nevertheless understood in the context of the remaining elements. - wikipedia
Now about answer ellipsis:
Answer ellipsis associated with question-answer pairs involves ellipsis. The question focuses an unknown piece of information, often using an interrogative word (e.g. who, what, when, etc.). The corresponding answer provides the missing information and in so doing, the redundant information that appeared in the question is elided ....
Here's an example cited in the article that has a similar construction to your sample question:
Q: Why has the campaign been so crazy?
A: (The campaign has been so crazy) Due to the personalities. (- Answer fragment)