It may have to do with the preference of the developers as well. But using vendor specific annotations over a config files can limit the portability of the application to a different vendor. If for example JPA annotations can be used as they are widely implemented by the vendors as it is the standard for the Java persistence.