Why is the file deleted not actually deleted from the hard drive?

From an article on file recovery I read, that when a file is deleted on your computer, only a pointer to the file is deleted and the space occupied by the file is marked as free to use. Is the only reason for this to recover "deleted" files or are there any other reasons why the space occupied isn't actually deleted (bits set to zero)?


The reason to prefer unlinking instead of zeroing a file is performance. It's far easier to simply zero a variable in the filesystem data structre rather than start overwriting an entire file. In modern filesystems unlinking the file takes a constant amount of time regardless of file size, whereas the time spent overwriting a file is proportional to file size.


Because it would take much more time, and is not necessary unless you want to make the recovery of deleted files impossible, which is rarely the case.