When I arrived, each client's CMS-like site was developed as a complete copy of some other client, with customization. But there was enough variation It was a real problem to maintain; if you found a bug, chances were that you'd have to fix it for numerous repositories and the solution might have to be different. Working from the inside out, we standardized all the shared functionality resulting in over 85% of the code being in a common repository with parameterized customization. We also were able to get rid of more than half the database tables, speed the site up considerably and add new functionality.
Obviously using common code reduces bug cost dramatically and it also meant that when we came up with a new feature we could offer it to all our clients right from the beginning without any cost to "port" it to another repository.