<p>We have a boilerplate close reason for such questions:</p>

<blockquote>
  <p>Self-study questions (including textbook exercises, old exam papers, and homework) that seek to understand the concepts are welcome, but those that demand a solution need to indicate clearly at what step help or advice are needed. For help writing a good self-study question, please visit the meta pages.</p>
</blockquote>

<p>This kind of question is starting to appear frequently enough (a few per day) that I no longer give any further thought to it: any blatantly obvious homework exercise (such as a definite quotation from a textbook or exam question) that is posted without additional comment or analysis automatically gets my close vote.</p>

<hr>

<p>As far as why these are off-topic, few people in this community (if any) participate for the joy of doing homework on behalf of those who just won't be bothered to make any effort themselves.  We would like to keep our site clear for questions that are new, interesting, or at least something the OP cares about.  I believe this is covered by the <a href="https://stats.stackexchange.com/help/dont-ask">admonition that</a></p>

<blockquote>
  <p>You should only ask practical, answerable questions based on actual problems that you face.</p>
</blockquote>

<p>Copy-pasted homework problems arguably are not of this sort, if we take the sense of "problem" to mean not just any question, but specifically a question in which one is interested and willing to invest some intellectual effort to obtain the answer.</p>
