If I understand this correctly, there are really two different pieces of the standalone executable:
- The MATLAB Runtime. This is the set of standard libraries that all applications run against.
- The CTF. This is the collection of files specific to your application.
There isn't really a sense of including or excluding whole toolboxes from your deployed application. When your application requires functionality from a toolbox, the CTF includes just the files from the toolbox that are required for your application. The routine that identifies which functions are needed sometimes overshoots and includes more than it is needed, which could accidentally bring in some files from a toolbox you aren't using (though it shouldn't ever be the whole toolbox). This routine changed in R2014a, when depfun was replaced with matlab.codetools.requiredFilesAndProducts. My guess is that this led to the change in behavior that you are seeing - maybe the algorithm is better and doesn't need this extra coaching? I'm not sure - just guessing. Additionally, R2015a introduced a change to the MATLAB Runtime. Instead of always including all libraries, the Compiler now picks from a few different versions based on what is used by your application. According to the release notes :
"MATLAB Compiler analyzes your MATLAB code for use of graphics or a GPU and defines and calculates optimized MATLAB Runtime. A MATLAB Runtime specific for each application is available for download from the web or included in the package."
This means the MATLAB Runtime will be a fair bit smaller if you don't use GPU support from the Parallel Computing Toolbox. I also think it says that if you don't use any graphics, you will get an even smaller runtime.