the idea of the script is to prune all possible caches that may cause problems when updating core. it is run usually before a release and to make sure a core is rebuild from scratch.
scripts