Note Accumulating multiple discussions about why the 'own code only' restriction is in place on Code Review
There are multiple reasons why Code Review has the restriction that the code has to be your own code.
Moral / Polite
The purpose of a code review is to provide constructive criticism. Criticism can only be constructive if given to the person who is the emotional 'owner' of the code. Many people consider their code to be their creative expression, and criticizing their code may feel like it is a direct criticism of them too. If a person volunteers for a code review here then it is expected that they are prepared for the criticism they may get. Without that voluntary submission, though, there would be nothing constructive about the criticism from the perspective of the person who wrote the code. Without the voluntary submission Code Review would be something like Code Crap where you go to laugh at and ridicule other people's code behind their back.
This can be abused even further. We have had instances on Code Review where 'managers' have requested their employee's code is reviewed, and the outcome of the review would impact that employee's job (fired?)
Practical
In real life, a code review happens as a routine part of the development cycle. It happens after the code is designed, developed, and tested and in the process of being committed to the code base in preparation for release. The person doing the review sits with the person who wrote the code, and they go through it together. If the reviewer has questions like "why are you doing it this way?" then the developer is right there to give the appropriate answer.
In Code Review, as an online resource, in a Q&A format, the expectation is that the text describing the code should explain why the code does things the way it does. Code that is just dumped without an explanation is, in Code Review terms, "unclear", and is likely to be closed as "Unclear what you are asking."
If the code is not your code, you cannot answer questions about what motivated certain implementation decisions, you can only speculate. By default, it is impossible for you to describe the motivations for the code if it is not your code, and thus the question is unclear. On code review this happens often enough for there to be a special off-topic close reason to cover this situation.
Taking this even further, questions on code review asking for an explanation of someone else's code are a complete reversal of the process. Questions like that are what we expect a code reviewer to ask, not what we expect to be asked by someone seeking a code review.
See: If your question contains someone else's code…
Legal
One of the reasons for the restriction is the implied licensing terms that are part of Stack Exchange. Anything you post here is automatically ascribed to the Creative-Commons ShareAlike type licensing. See Section 6 of your terms-of-service - subsection "Subscriber Content" here on Stack Exchange.
If it is not your code, then you have no authority to give away the licensing for it.