See here:
So these are locations where packages can store data they want to mutate.
Usually you don’t manage them. And probably should not. Here at the bottom it notes:
Scratch spaces are designed for data caches that are completely managed by a package and should be removed when the package itself is uninstalled.