I've noticed several instances of papers in mathematics which include an appendix written by someone who is not among the authors of the main body of the paper (for instance, here).
I'm quite curious about this practice (I don't have a practical reason for asking, except for wanting to understand academic environment a little better). Specifically:
What's the motivation for the authors to for this kind of partition? It seems that it would be entirely within the ethical and cultural norms to simply write a joint paper, or to write two independent papers. Joint paper seems like a much easier option, two disjoint papers is simpler and more clear cut (and a cynical person might add - produces more citations).
For the sake of keeping track of publications (for the sake of CV, citation counts, etc.) does the author of an appendix count as being one of the authors of the paper, not being among the authors of the paper, or being the sole author of the appendix which counts as an independent publication?