We all know the following problem:
Imagine we are developing a web application, and we do it at our local workstation. The application uses the locally-installed MySQL instance with some particular database name, username, and a password. When we deploy this application, it'll use the MySQL instance installed at the deploy target, over which we can or cannot have control in choosing names and passwords. Even if we have total control over the deploy target and can use the same connection settings, it's highly impractical to enforce our own usernames and passwords on other people in the team, who are working on the same web application on their own workstations.
As the Yii application configuration is just a PHP script returning an associative array, we have a simple way of solving this problem: all pieces of configuration that should be specified for each deploy target individually can be moved to separate files. The main configuration will just include their contents...