I think it is necessary for their model to work. We all have been gone through this at some point of time. Consider below points
Zillions of similar questions = Low quality search = Less users
Punishing on Poor Formatting = Restriction of only High Quality Formatted Code => experienced developers to help you fast. You can’t just say your code doesn’t work as question description.
Forces you to get in detail of your issue and then post. (Chances are while you get the root cause of your issue you’ll find a solution already on SO.)
All this boils down to
TO GET CORRECT ANSWER FIRST ASK CORRECT QUESTION..
Originally Written on Quora.