Syntax errors are valid questions if presented correctly.
The example you gave has a fairly poor title, and at first glance I don't think there's enough info in the question to solve it. We have a close reason for that.
Deletion isn't the correct action if the question is fixable (like this one) as that would make it much harder for the OP and others to correct the mistakes and turn it into a good question.
We don't have whole categories of questions that are just indiscriminately deleted. Instead, we have close reasons, upvotes/downvotes, and the roomba. There is no "This is a syntax error" close reason just like there isn't a "This is a homework question" reason or even a "this is a regex question" reason. Questions get closed based on the existing close reasons and usefulness is judged through upvotes and downvotes. If it isn't useful, the roomba cleans up the mess later. Deletion is for cases where the roomba can't clean up the mess and the information being presented is harmful or will attract further useless content.