When you quit() or exit() then finish is automatically run https://www.mathworks.com/help/matlab/ref/quit.html and https://www.mathworks.com/help/matlab/ref/finish.html
Use
which finish
to locate the user script that is being invoked.
In the meantime, you could
mkdir('c:\Users\Public\Documents\matlabusage')
to create the directory so that the usage information could be written into it. (usagelog is not something provided by Mathworks, by the way.)