Classpaths are often long and must be conveyed to the Java process. You can either pass on the command-line (but many systems have process line length limits), or you can write the classpath in a file and convey that way. The Clojure CLI does the latter, but this requires writing a file somewhere. There are multiple places the file can be written and logic that to detect the correct place to do so. If the system reports that it can be written but can't, or cannot be written, I don't know what the CLI can be expected to do about this (it seems problematic for downloading Maven libs, downloading git libs, prepping git libs, and many other features of the CLI/tools.deps).
Trying to write files to test whether they can be written does not work because we use the presence of the file to detect whether the cached file exists. Adding more environment variables is not desired - there are too many configuration options already and in many cases this logic exists in multiple locations (bash and tools.deps clojure) that must be kept in sync and all code that reads/writes the cache has to agree. All of these options are bad to varying degrees.