In general it's just a matter of tidiness: configuration files can grow a lot (thousands of lines) in real big applications.
Also this approach allows you to divide in modules a big application without the pain of splitting this file. I've worked in several projects where the database access layer has a SOAP/REST API and more than one front-end applications obtain any needed data through that API, so this service is deployed as a standalone module.