Code ownership is a smell, and we need to avoid it. When several developers contribute to the same codebase, several great minds are thinking of the same problem, which eventually results in a better solution. On the opposite side of the spectrum, with strong code ownership, you inevitably end up with a code that is easier to rewrite than to understand by others.
I took this as granted until I came across a Microsoft research that contradicted my common sense. They showed that code ownership results in higher code quality and fewer bugs.
That the more engineers modify a file, the higher the number of bugs that are linked to this file and that if there is one primary contributor, the chances for a file to be buggy decreases significantly.
Looking further, I found out that researches and practitioners went to both extremes. There is more to read at https://wiki.c2.com/?CodeOwnership.
I wish I could culminate this post with an elegant theory or at least a rule of thumb that would embrace both points of view, but nothing beyond helpless “it all depends” and “the truth lies somewhere in between” comes to mind. I keep this question open to myself.