Fred Brooks had a term for this: Conceptual Integrity. When there's one mind working on the codebase, it's natural that it will have a higher degree of Conceptual Integrity.
A team can achieve this, but they need to have been working together a long time or have a very, very strong technical lead.
For the single developer case, I think maintainability and scalability then comes down to whether the developer follows good practices or not. Commenting, refactoring, reorganizing code, unit testing, etc. But a product or codebase with high Conceptual Integrity is generally easier to expand on because there are common patterns throughout the code, even if it's lacking in comments.
A team can achieve this, but they need to have been working together a long time or have a very, very strong technical lead.
For the single developer case, I think maintainability and scalability then comes down to whether the developer follows good practices or not. Commenting, refactoring, reorganizing code, unit testing, etc. But a product or codebase with high Conceptual Integrity is generally easier to expand on because there are common patterns throughout the code, even if it's lacking in comments.