You have clearly never run out of space on a APFS volume. If you run out of space on APFS you literally cannot delete files, because the APFS equivalent of a superblock must first be journaled to disk and if there is no space to journal it before deleting the files then you cannot delete anything!
In such a situation, if you force restart to recovery mode, then sometimes enough uncommitted files will "go missing" to make it possible to delete something to make enough space to write the journal to allow you to delete more.
The official Apple solution in such a case: use Disk Utility to reformat the drive, losing the entire contents of the drive.
Because of this it can be useful to run a third-party cleaning up to periodically empty trash and remove cache files -- reducing the likelihood that your drive will fill completely.