A hammer can be used as a tool and as a weapon . Is that a reason to prohibit the use of a hammer?
Problem is that sometimes original code have too much irrelevant code. So if you add whole code than reader will have problem to read everything, plus you will get comments that are not relevant to your question. I usually need help with general problem, when I implement something but I am quite sure that can be done better. I don't care about better naming, or better some other not relevant thing that will be done later or not, because is not important for me. So hypothetical code is good to keep focus on general point of question, and to get straight answer. Ofcours there is risk with hypothetical code if is not good enough, but that is problem in person that use hypothetical code in wrong way. It is not problem in hypothetical code.