Some maintenance scripts assume that outputs can be written to the local file system for later use (e.g., by other scripts). This of course does not work today, since although API objects associated with a completed pod remain (as do logs), the overlay file system does not.
While used relatively rarely, the scripts to generate title-case mapping overrides are one such example. In T372603 (mapping for the 7.4 to 8.1 migration), we used kind of a hack where the contents of generateUpperCharTable.php were run inline in the shell.php REPL and written to /tmp, then while the REPL was still running, the results kubectl cp'd out.
It would be nice if this could be done a bit less awkwardly, even if that simply means adding an (optional) pause somewhere (to avoid the shell.php trick and allow direct invocation of the desired script), and displaying example commands for copying out files.
I don't know how widely something like this is needed, but from a naive spot check for file_put_contents use in maintenance/, it seems like other use cases likely exist.