Another view I've hear of is that John 21 is the "missing ending" of Mark (although it is far from certain that there WAS a lost ending to Mark). The content is roughly what we might expect - agreeing with Matthew rather than Luke, however the styles of John and Mark are far enough apart that I would have thought that if it were true it would be widely accepted by now.
The clear disagreement between Matthew and Luke may be another reason for the double ending. Perhaps John acquired two endings, one agreeing with each and later redactors or copyists brought them together, finding themselves unable to reject either (just as the additions to Mark were preserved).
Edited by PaulK, : No reason given.