I don't know why the person who asked the question is allowed to do this.
Personally, I don't think it is very strictly forbidden, but I agree with you that this is not how SO is meant to function. If it isn't strictly forbidden, it actually should be. You can off course downvote the answer, and point out to the OP that this is not acceptable practice.
You can always flag the answer for moderator attention (see the little links bottom left of the post).