With the current Directory architecture, changing one behavior imply to rebuild several classes (ex: RepositoryDirectory.java, RepositoryDirectoryDescriptor.java, RepositoryDirectoryFactory.java, RepositoryDirectoryReference.java, RepositoryDirectoryRegistry.java, RepositoryDirectorySession.java) : in some case where for example you just want to add some built-in filtering this is overkill.
An similar exemple is the Multi-Tenant than was then directly added inside the SQL Directory implentation.
To avoid that, the idea is to allow to contribute a Session Wrapper that can incorporate the specific code without requiring to override the while chain of classes.